From 62cdf4e6671cb35b6060a6db4ee30dd848db6892 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:18:07 -0400 Subject: [PATCH] [ICD] Add User active mode trigger types and attributes (#30053) * update xml to add UAT attributes * Generated files * fix type and id * fix zap --- .../all-clusters-app.matter | 20 ++ .../light-switch-app.matter | 20 ++ examples/lock-app/lock-common/lock-app.matter | 20 ++ .../smoke-co-alarm-app.matter | 20 ++ .../chip/icd-management-cluster.xml | 23 +++ .../zcl/zcl-with-test-extensions.json | 4 +- src/app/zap-templates/zcl/zcl.json | 4 +- .../data_model/controller-clusters.matter | 22 +++ .../chip/devicecontroller/ChipClusters.java | 28 +++ .../devicecontroller/ClusterIDMapping.java | 2 + .../devicecontroller/ClusterReadMapping.java | 22 +++ .../CHIPAttributeTLVValueDecoder.cpp | 28 +++ .../python/chip/clusters/CHIPClusters.py | 12 ++ .../python/chip/clusters/Objects.py | 55 ++++++ .../MTRAttributeSpecifiedCheck.mm | 6 + .../MTRAttributeTLVValueDecoder.mm | 31 +++ .../CHIP/zap-generated/MTRBaseClusters.h | 32 ++++ .../CHIP/zap-generated/MTRBaseClusters.mm | 72 +++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 2 + .../CHIP/zap-generated/MTRClusters.h | 4 + .../CHIP/zap-generated/MTRClusters.mm | 10 + .../app-common/zap-generated/cluster-enums.h | 22 +++ .../zap-generated/cluster-objects.cpp | 4 + .../zap-generated/cluster-objects.h | 28 +++ .../app-common/zap-generated/ids/Attributes.h | 8 + .../zap-generated/cluster/Commands.h | 18 +- .../cluster/logging/DataModelLogger.cpp | 10 + .../zap-generated/cluster/Commands.h | 180 ++++++++++++++++++ 28 files changed, 704 insertions(+), 3 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index b394d6937818f7..a2f4ff3e3c28ed 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2463,6 +2463,26 @@ server cluster IcdManagement = 70 { kLongIdleTimeSupport = 0x4; } + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + fabric_scoped struct MonitoringRegistrationStruct { fabric_sensitive node_id checkInNodeID = 1; fabric_sensitive int64u monitoredSubject = 2; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 16ce5bbb18a884..dfc5e4a71586d7 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1956,6 +1956,26 @@ server cluster IcdManagement = 70 { kLongIdleTimeSupport = 0x4; } + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + fabric_scoped struct MonitoringRegistrationStruct { fabric_sensitive node_id checkInNodeID = 1; fabric_sensitive int64u monitoredSubject = 2; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 48958285bd8da8..4c89338e602a9d 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1687,6 +1687,26 @@ server cluster IcdManagement = 70 { kLongIdleTimeSupport = 0x4; } + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + fabric_scoped struct MonitoringRegistrationStruct { fabric_sensitive node_id checkInNodeID = 1; fabric_sensitive int64u monitoredSubject = 2; diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index cb5f49eaa38f65..b1f953f847ecfa 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1569,6 +1569,26 @@ server cluster IcdManagement = 70 { kLongIdleTimeSupport = 0x4; } + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + fabric_scoped struct MonitoringRegistrationStruct { fabric_sensitive node_id checkInNodeID = 1; fabric_sensitive int64u monitoredSubject = 2; diff --git a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml index 6f0951831ccf9a..90a335b46b1988 100644 --- a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml @@ -25,6 +25,27 @@ limitations under the License. + + + + + + + + + + + + + + + + + + + + + @@ -56,6 +77,8 @@ limitations under the License. ClientsSupportedPerFabric + UserActiveModeTriggerHint + UserActiveModeTriggerInstruction Register a client to the end device diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index d5e8f55dfdf964..543a902517da97 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -202,7 +202,9 @@ "ActiveModeThreshold", "RegisteredClients", "ICDCounter", - "ClientsSupportedPerFabric" + "ClientsSupportedPerFabric", + "UserActiveModeTriggerHint", + "UserActiveModeTriggerInstruction" ], "Operational Credentials": [ "SupportedFabrics", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 77462935f97592..c047c56557e2fa 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -200,7 +200,9 @@ "ActiveModeThreshold", "RegisteredClients", "ICDCounter", - "ClientsSupportedPerFabric" + "ClientsSupportedPerFabric", + "UserActiveModeTriggerHint", + "UserActiveModeTriggerInstruction" ], "Operational Credentials": [ "SupportedFabrics", diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index caabe18f4fa4b4..23a39b6f7dbe82 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2727,6 +2727,26 @@ client cluster IcdManagement = 70 { kLongIdleTimeSupport = 0x4; } + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + fabric_scoped struct MonitoringRegistrationStruct { fabric_sensitive node_id checkInNodeID = 1; fabric_sensitive int64u monitoredSubject = 2; @@ -2739,6 +2759,8 @@ client cluster IcdManagement = 70 { readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; readonly attribute access(read: administer) optional int32u ICDCounter = 4; readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index e79b8954570243..62c12f62001130 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -10938,6 +10938,26 @@ public void subscribeClientsSupportedPerFabricAttribute( subscribeClientsSupportedPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readUserActiveModeTriggerHintAttribute( + LongAttributeCallback callback) { + readUserActiveModeTriggerHintAttribute(chipClusterPtr, callback); + } + + public void subscribeUserActiveModeTriggerHintAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUserActiveModeTriggerHintAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUserActiveModeTriggerInstructionAttribute( + CharStringAttributeCallback callback) { + readUserActiveModeTriggerInstructionAttribute(chipClusterPtr, callback); + } + + public void subscribeUserActiveModeTriggerInstructionAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUserActiveModeTriggerInstructionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { readGeneratedCommandListAttribute(chipClusterPtr, callback); @@ -11022,6 +11042,14 @@ public void subscribeClusterRevisionAttribute( private native void subscribeClientsSupportedPerFabricAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readUserActiveModeTriggerHintAttribute(long chipClusterPtr, LongAttributeCallback callback); + + private native void subscribeUserActiveModeTriggerHintAttribute(long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + + private native void readUserActiveModeTriggerInstructionAttribute(long chipClusterPtr, CharStringAttributeCallback callback); + + private native void subscribeUserActiveModeTriggerInstructionAttribute(long chipClusterPtr, CharStringAttributeCallback callback, int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback); private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index c5d09f3834e59b..413541bdf799b4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -5968,6 +5968,8 @@ public enum Attribute { RegisteredClients(3L), ICDCounter(4L), ClientsSupportedPerFabric(5L), + UserActiveModeTriggerHint(6L), + UserActiveModeTriggerInstruction(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 8cd4db031a7831..8fc29e53155f78 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -5917,6 +5917,28 @@ private static Map readIcdManagementInteractionInfo() { readIcdManagementClientsSupportedPerFabricCommandParams ); result.put("readClientsSupportedPerFabricAttribute", readIcdManagementClientsSupportedPerFabricAttributeInteractionInfo); + Map readIcdManagementUserActiveModeTriggerHintCommandParams = new LinkedHashMap(); + InteractionInfo readIcdManagementUserActiveModeTriggerHintAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.IcdManagementCluster) cluster).readUserActiveModeTriggerHintAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readIcdManagementUserActiveModeTriggerHintCommandParams + ); + result.put("readUserActiveModeTriggerHintAttribute", readIcdManagementUserActiveModeTriggerHintAttributeInteractionInfo); + Map readIcdManagementUserActiveModeTriggerInstructionCommandParams = new LinkedHashMap(); + InteractionInfo readIcdManagementUserActiveModeTriggerInstructionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.IcdManagementCluster) cluster).readUserActiveModeTriggerInstructionAttribute( + (ChipClusters.CharStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), + readIcdManagementUserActiveModeTriggerInstructionCommandParams + ); + result.put("readUserActiveModeTriggerInstructionAttribute", readIcdManagementUserActiveModeTriggerInstructionAttributeInteractionInfo); Map readIcdManagementGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readIcdManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 5e2b611d121792..a6d9ea102648fb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -12497,6 +12497,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + case Attributes::UserActiveModeTriggerHint::Id: { + using TypeInfo = Attributes::UserActiveModeTriggerHint::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::UserActiveModeTriggerInstruction::Id: { + using TypeInfo = Attributes::UserActiveModeTriggerInstruction::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index e5efbe902213d2..efa9adc53cfdab 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4266,6 +4266,18 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000006: { + "attributeName": "UserActiveModeTriggerHint", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "UserActiveModeTriggerInstruction", + "attributeId": 0x00000007, + "type": "str", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index e67077ba62feb3..88586082873a12 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -14705,6 +14705,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="registeredClients", Tag=0x00000003, Type=typing.Optional[typing.List[IcdManagement.Structs.MonitoringRegistrationStruct]]), ClusterObjectFieldDescriptor(Label="ICDCounter", Tag=0x00000004, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clientsSupportedPerFabric", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="userActiveModeTriggerHint", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="userActiveModeTriggerInstruction", Tag=0x00000007, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -14719,6 +14721,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: registeredClients: 'typing.Optional[typing.List[IcdManagement.Structs.MonitoringRegistrationStruct]]' = None ICDCounter: 'typing.Optional[uint]' = None clientsSupportedPerFabric: 'typing.Optional[uint]' = None + userActiveModeTriggerHint: 'typing.Optional[uint]' = None + userActiveModeTriggerInstruction: 'typing.Optional[str]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -14732,6 +14736,25 @@ class Feature(IntFlag): kUserActiveModeTrigger = 0x2 kLongIdleTimeSupport = 0x4 + class UserActiveModeTriggerBitmap(IntFlag): + kPowerCycle = 0x1 + kSettingsMenu = 0x2 + kCustomInstruction = 0x4 + kDeviceManual = 0x8 + kActuateSensor = 0x10 + kActuateSensorSeconds = 0x20 + kActuateSensorTimes = 0x40 + kActuateSensorLightsBlink = 0x80 + kResetButton = 0x100 + kResetButtonLightsBlink = 0x200 + kResetButtonSeconds = 0x400 + kResetButtonTimes = 0x800 + kSetupButton = 0x1000 + kSetupButtonSeconds = 0x2000 + kSetupButtonLightsBlink = 0x4000 + kSetupButtonTimes = 0x8000 + kAppDefinedButton = 0x10000 + class Structs: @dataclass class MonitoringRegistrationStruct(ClusterObject): @@ -14915,6 +14938,38 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class UserActiveModeTriggerHint(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class UserActiveModeTriggerInstruction(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000046 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + + value: 'typing.Optional[str]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index f034ce2ef1cb3c..6400bbbdf26e85 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1890,6 +1890,12 @@ static BOOL AttributeIsSpecifiedInICDManagementCluster(AttributeId aAttributeId) case Attributes::ClientsSupportedPerFabric::Id: { return YES; } + case Attributes::UserActiveModeTriggerHint::Id: { + return YES; + } + case Attributes::UserActiveModeTriggerInstruction::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 4fcd7e0c8bd86f..5ce56aaa434625 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -5198,6 +5198,37 @@ static id _Nullable DecodeAttributeValueForICDManagementCluster(AttributeId aAtt value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::UserActiveModeTriggerHint::Id: { + using TypeInfo = Attributes::UserActiveModeTriggerHint::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + return value; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + case Attributes::UserActiveModeTriggerInstruction::Id: { + using TypeInfo = Attributes::UserActiveModeTriggerInstruction::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = AsString(cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } #endif // MTR_ENABLE_PROVISIONAL default: { break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 43dde2ac143c4e..8fafd59791f602 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -4533,6 +4533,18 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14256,6 +14268,26 @@ typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { MTRICDManagementFeatureLongIdleTimeSupport MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRICDManagementUserActiveModeTriggerBitmap) { + MTRICDManagementUserActiveModeTriggerBitmapPowerCycle MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRICDManagementUserActiveModeTriggerBitmapSettingsMenu MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRICDManagementUserActiveModeTriggerBitmapCustomInstruction MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRICDManagementUserActiveModeTriggerBitmapDeviceManual MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensor MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorSeconds MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorTimes MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x80, + MTRICDManagementUserActiveModeTriggerBitmapResetButton MTR_PROVISIONALLY_AVAILABLE = 0x100, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x200, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x400, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x800, + MTRICDManagementUserActiveModeTriggerBitmapSetupButton MTR_PROVISIONALLY_AVAILABLE = 0x1000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x2000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x8000, + MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_PROVISIONALLY_AVAILABLE = 0x10000, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { MTRModeSelectFeatureOnOff MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, MTRModeSelectFeatureDEPONOFF MTR_DEPRECATED("Please use MTRModeSelectFeatureOnOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 12d57c62be25db..ec55b1beca255a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -38857,6 +38857,78 @@ + (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterS completion:completion]; } +- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index d2307978241522..c42739771e0925 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2240,6 +2240,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterICDManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 78984c02bd52a4..bbc0a86180ec83 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -2210,6 +2210,10 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 3c33dee7774b9e..9650aaf7d0e7a6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -6934,6 +6934,16 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; } +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 67788b9dd4318d..01562874f35f53 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -1491,6 +1491,28 @@ enum class Feature : uint32_t kUserActiveModeTrigger = 0x2, kLongIdleTimeSupport = 0x4, }; + +// Bitmap for UserActiveModeTriggerBitmap +enum class UserActiveModeTriggerBitmap : uint32_t +{ + kPowerCycle = 0x1, + kSettingsMenu = 0x2, + kCustomInstruction = 0x4, + kDeviceManual = 0x8, + kActuateSensor = 0x10, + kActuateSensorSeconds = 0x20, + kActuateSensorTimes = 0x40, + kActuateSensorLightsBlink = 0x80, + kResetButton = 0x100, + kResetButtonLightsBlink = 0x200, + kResetButtonSeconds = 0x400, + kResetButtonTimes = 0x800, + kSetupButton = 0x1000, + kSetupButtonSeconds = 0x2000, + kSetupButtonLightsBlink = 0x4000, + kSetupButtonTimes = 0x8000, + kAppDefinedButton = 0x10000, +}; } // namespace IcdManagement namespace ModeSelect { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index c59f529bde4a5f..139fc46ed756bf 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -10437,6 +10437,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, ICDCounter); case Attributes::ClientsSupportedPerFabric::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, clientsSupportedPerFabric); + case Attributes::UserActiveModeTriggerHint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userActiveModeTriggerHint); + case Attributes::UserActiveModeTriggerInstruction::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userActiveModeTriggerInstruction); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 26ad7ac20b2b50..e0ded3fa26632b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -14116,6 +14116,31 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ClientsSupportedPerFabric +namespace UserActiveModeTriggerHint { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerHint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UserActiveModeTriggerHint +namespace UserActiveModeTriggerInstruction { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerInstruction::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 128; } +}; +} // namespace UserActiveModeTriggerInstruction namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -14167,6 +14192,9 @@ struct TypeInfo Attributes::RegisteredClients::TypeInfo::DecodableType registeredClients; Attributes::ICDCounter::TypeInfo::DecodableType ICDCounter = static_cast(0); Attributes::ClientsSupportedPerFabric::TypeInfo::DecodableType clientsSupportedPerFabric = static_cast(0); + Attributes::UserActiveModeTriggerHint::TypeInfo::DecodableType userActiveModeTriggerHint = + static_cast>(0); + Attributes::UserActiveModeTriggerInstruction::TypeInfo::DecodableType userActiveModeTriggerInstruction; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index c636d2caa06ee1..d58e6eb18dd62a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2410,6 +2410,14 @@ namespace ClientsSupportedPerFabric { static constexpr AttributeId Id = 0x00000005; } // namespace ClientsSupportedPerFabric +namespace UserActiveModeTriggerHint { +static constexpr AttributeId Id = 0x00000006; +} // namespace UserActiveModeTriggerHint + +namespace UserActiveModeTriggerInstruction { +static constexpr AttributeId Id = 0x00000007; +} // namespace UserActiveModeTriggerInstruction + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index bd1852ca31af5a..8b0b717eb30aae 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -4498,6 +4498,8 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand | * RegisteredClients | 0x0003 | | * ICDCounter | 0x0004 | | * ClientsSupportedPerFabric | 0x0005 | +| * UserActiveModeTriggerHint | 0x0006 | +| * UserActiveModeTriggerInstruction | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -14985,6 +14987,10 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-hint", Attributes::UserActiveModeTriggerHint::Id, + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-instruction", Attributes::UserActiveModeTriggerInstruction::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -15007,6 +15013,12 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands make_unique>(Id, "clients-supported-per-fabric", 0, UINT16_MAX, Attributes::ClientsSupportedPerFabric::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "user-active-mode-trigger-hint", 0, UINT32_MAX, Attributes::UserActiveModeTriggerHint::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "user-active-mode-trigger-instruction", + Attributes::UserActiveModeTriggerInstruction::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15027,7 +15039,11 @@ void registerClusterIcdManagement(Commands & commands, CredentialIssuerCommands make_unique(Id, "registered-clients", Attributes::RegisteredClients::Id, credsIssuerConfig), // make_unique(Id, "icdcounter", Attributes::ICDCounter::Id, credsIssuerConfig), // make_unique(Id, "clients-supported-per-fabric", Attributes::ClientsSupportedPerFabric::Id, - credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-hint", Attributes::UserActiveModeTriggerHint::Id, + credsIssuerConfig), // + make_unique(Id, "user-active-mode-trigger-instruction", + Attributes::UserActiveModeTriggerInstruction::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index ae45b6d5ef70c7..037fd3a4af6e9b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -7998,6 +7998,16 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClientsSupportedPerFabric", 1, value); } + case IcdManagement::Attributes::UserActiveModeTriggerHint::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("UserActiveModeTriggerHint", 1, value); + } + case IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id: { + chip::CharSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("UserActiveModeTriggerInstruction", 1, value); + } case IcdManagement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index ab996359816e33..519a27da8c68ba 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -48937,6 +48937,8 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute | * RegisteredClients | 0x0003 | | * ICDCounter | 0x0004 | | * ClientsSupportedPerFabric | 0x0005 | +| * UserActiveModeTriggerHint | 0x0006 | +| * UserActiveModeTriggerInstruction | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -49630,6 +49632,176 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/* + * Attribute UserActiveModeTriggerHint + */ +class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { +public: + ReadIcdManagementUserActiveModeTriggerHint() + : ReadAttribute("user-active-mode-trigger-hint") + { + } + + ~ReadIcdManagementUserActiveModeTriggerHint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserActiveModeTriggerHintWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ICDManagement UserActiveModeTriggerHint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public SubscribeAttribute { +public: + SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + : SubscribeAttribute("user-active-mode-trigger-hint") + { + } + + ~SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUserActiveModeTriggerHintWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute UserActiveModeTriggerInstruction + */ +class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { +public: + ReadIcdManagementUserActiveModeTriggerInstruction() + : ReadAttribute("user-active-mode-trigger-instruction") + { + } + + ~ReadIcdManagementUserActiveModeTriggerInstruction() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserActiveModeTriggerInstructionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ICDManagement UserActiveModeTriggerInstruction read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public SubscribeAttribute { +public: + SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + : SubscribeAttribute("user-active-mode-trigger-instruction") + { + } + + ~SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUserActiveModeTriggerInstructionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -155235,6 +155407,14 @@ void registerClusterIcdManagement(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), //