From daf6f84cf238416b2b1d62ab34e055add5cff999 Mon Sep 17 00:00:00 2001 From: Fesseha Date: Tue, 12 Dec 2023 11:22:13 +0100 Subject: [PATCH 1/9] update boolean configuration cluster according to latest spec --- .../boolean-sensor-configuration-cluster.xml | 32 +- .../data_model/controller-clusters.matter | 35 +- .../chip/devicecontroller/ChipClusters.java | 165 +++++- .../devicecontroller/ChipEventStructs.java | 46 ++ .../devicecontroller/ClusterIDMapping.java | 40 +- .../devicecontroller/ClusterInfoMapping.java | 31 +- .../devicecontroller/ClusterReadMapping.java | 54 +- .../devicecontroller/ClusterWriteMapping.java | 38 +- ...sorConfigurationClusterSensorFaultEvent.kt | 55 ++ .../chip/devicecontroller/cluster/files.gni | 1 + .../BooleanSensorConfigurationCluster.kt | 204 +++++-- ...sorConfigurationClusterSensorFaultEvent.kt | 55 ++ .../matter/devicecontroller/cluster/files.gni | 1 + .../CHIPAttributeTLVValueDecoder.cpp | 68 ++- .../zap-generated/CHIPClustersWrite-JNI.cpp | 56 +- .../CHIPEventTLVValueDecoder.cpp | 12 +- .../python/chip/clusters/CHIPClusters.py | 42 +- .../python/chip/clusters/Objects.py | 129 ++++- .../MTRAttributeSpecifiedCheck.mm | 14 +- .../MTRAttributeTLVValueDecoder.mm | 50 +- .../CHIP/zap-generated/MTRBaseClusters.h | 62 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 224 ++++++-- .../CHIP/zap-generated/MTRClusterConstants.h | 15 +- .../CHIP/zap-generated/MTRClusters.h | 19 +- .../CHIP/zap-generated/MTRClusters.mm | 66 ++- .../zap-generated/MTRCommandPayloadsObjc.h | 32 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 87 ++- .../MTRCommandPayloads_Internal.h | 8 +- .../zap-generated/MTREventTLVValueDecoder.mm | 6 + .../CHIP/zap-generated/MTRStructsObjc.h | 1 + .../CHIP/zap-generated/MTRStructsObjc.mm | 6 +- .../zap-generated/attributes/Accessors.cpp | 141 ++++- .../zap-generated/attributes/Accessors.h | 32 +- .../app-common/zap-generated/callback.h | 12 +- .../zap-generated/cluster-enums-check.h | 14 - .../app-common/zap-generated/cluster-enums.h | 19 +- .../zap-generated/cluster-objects.cpp | 64 ++- .../zap-generated/cluster-objects.h | 123 +++- .../app-common/zap-generated/ids/Attributes.h | 26 +- .../app-common/zap-generated/ids/Commands.h | 8 +- .../zap-generated/cluster/Commands.h | 131 +++-- .../cluster/logging/DataModelLogger.cpp | 34 +- .../zap-generated/cluster/Commands.h | 531 +++++++++++++++--- 43 files changed, 2285 insertions(+), 504 deletions(-) create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt create mode 100644 src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml index 44bb181f2b9d59..bb2ecf9046805d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml @@ -31,12 +31,10 @@ limitations under the License. - + - - - - + + Boolean Sensor Configuration @@ -48,16 +46,25 @@ limitations under the License. This cluster is used to configure a boolean sensor. - SensitivityLevel - AlarmsActive - AlarmsSuppressed - AlarmsEnabled + CurrentSensitivityLevel + SupportedSensitivityLevels + DefaultSensitivityLevel + AlarmsActive + AlarmsSuppressed + AlarmsEnabled + AlarmsSupported + SensorFault - - This command is used to suppress the specified alarm. + + This command is used to suppress the specified alarm mode. + + This command is used to enable or disable the specified alarm mode. + + + This event SHALL be generated when any bits in the AlarmsActive and/or AlarmsSuppressed attributes change. @@ -65,7 +72,8 @@ limitations under the License. - This event SHALL be generated when the device detects a sensor fault. + This event SHALL be generated when the device registers or clears a fault. + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 2d1909cb0ee41b..bcea2d56e79364 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4000,12 +4000,6 @@ cluster ActivatedCarbonFilterMonitoring = 114 { provisional cluster BooleanSensorConfiguration = 128 { revision 1; - enum SensitivityEnum : enum8 { - kHigh = 0; - kStandard = 1; - kLow = 2; - } - bitmap AlarmModeBitmap : bitmap8 { kVisual = 0x1; kAudible = 0x2; @@ -4018,18 +4012,27 @@ provisional cluster BooleanSensorConfiguration = 128 { kSensitivityLevel = 0x8; } + bitmap SensorFaultBitmap : bitmap16 { + kGneralFault = 0x1; + } + info event AlarmsStateChanged = 0 { AlarmModeBitmap alarmsActive = 0; optional AlarmModeBitmap alarmsSuppressed = 1; } info event SensorFault = 1 { + SensorFaultBitmap sensorFault = 0; } - attribute optional SensitivityEnum sensitivityLevel = 0; - readonly attribute optional AlarmModeBitmap alarmsActive = 1; - readonly attribute optional AlarmModeBitmap alarmsSuppressed = 2; - attribute optional AlarmModeBitmap alarmsEnabled = 3; + attribute optional int8u currentSensitivityLevel = 0; + readonly attribute optional int8u supportedSensitivityLevels = 1; + readonly attribute optional int8u defaultSensitivityLevel = 2; + readonly attribute optional AlarmModeBitmap alarmsActive = 3; + readonly attribute optional AlarmModeBitmap alarmsSuppressed = 4; + readonly attribute optional AlarmModeBitmap alarmsEnabled = 5; + readonly attribute optional AlarmModeBitmap alarmsSupported = 6; + readonly attribute optional SensorFaultBitmap sensorFault = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4037,12 +4040,18 @@ provisional cluster BooleanSensorConfiguration = 128 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct SuppressRequestRequest { + request struct SuppressAlarmRequest { AlarmModeBitmap alarmsToSuppress = 0; } - /** This command is used to suppress the specified alarm. */ - command SuppressRequest(SuppressRequestRequest): DefaultSuccess = 0; + request struct EnableDisableAlarmRequest { + AlarmModeBitmap alarmsToEnableDisable = 0; + } + + /** This command is used to suppress the specified alarm mode. */ + command SuppressAlarm(SuppressAlarmRequest): DefaultSuccess = 0; + /** This command is used to enable or disable the specified alarm mode. */ + command EnableDisableAlarm(EnableDisableAlarmRequest): DefaultSuccess = 1; } /** This cluster is used to configure a valve. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index b571ac051e3f2b..b340f0bf423e1b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -27419,10 +27419,14 @@ public void onSuccess(byte[] tlv) { public static class BooleanSensorConfigurationCluster extends BaseChipCluster { public static final long CLUSTER_ID = 128L; - private static final long SENSITIVITY_LEVEL_ATTRIBUTE_ID = 0L; - private static final long ALARMS_ACTIVE_ATTRIBUTE_ID = 1L; - private static final long ALARMS_SUPPRESSED_ATTRIBUTE_ID = 2L; - private static final long ALARMS_ENABLED_ATTRIBUTE_ID = 3L; + private static final long CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 0L; + private static final long SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID = 1L; + private static final long DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 2L; + private static final long ALARMS_ACTIVE_ATTRIBUTE_ID = 3L; + private static final long ALARMS_SUPPRESSED_ATTRIBUTE_ID = 4L; + private static final long ALARMS_ENABLED_ATTRIBUTE_ID = 5L; + private static final long ALARMS_SUPPORTED_ATTRIBUTE_ID = 6L; + private static final long SENSOR_FAULT_ATTRIBUTE_ID = 7L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -27440,11 +27444,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void suppressRequest(DefaultClusterCallback callback, Integer alarmsToSuppress) { - suppressRequest(callback, alarmsToSuppress, 0); + public void suppressAlarm(DefaultClusterCallback callback, Integer alarmsToSuppress) { + suppressAlarm(callback, alarmsToSuppress, 0); } - public void suppressRequest(DefaultClusterCallback callback, Integer alarmsToSuppress, int timedInvokeTimeoutMs) { + public void suppressAlarm(DefaultClusterCallback callback, Integer alarmsToSuppress, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -27460,6 +27464,26 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } + public void enableDisableAlarm(DefaultClusterCallback callback, Integer alarmsToEnableDisable) { + enableDisableAlarm(callback, alarmsToEnableDisable, 0); + } + + public void enableDisableAlarm(DefaultClusterCallback callback, Integer alarmsToEnableDisable, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long alarmsToEnableDisableFieldID = 0L; + BaseTLVType alarmsToEnableDisabletlvValue = new UIntType(alarmsToEnableDisable); + elements.add(new StructElement(alarmsToEnableDisableFieldID, alarmsToEnableDisabletlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -27476,9 +27500,9 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSensitivityLevelAttribute( + public void readCurrentSensitivityLevelAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSITIVITY_LEVEL_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -27486,28 +27510,78 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); + }, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); } - public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeSensitivityLevelAttribute(callback, value, 0); + public void writeCurrentSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeCurrentSensitivityLevelAttribute(callback, value, 0); } - public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + public void writeCurrentSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), SENSITIVITY_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + writeAttribute(new WriteAttributesCallbackImpl(callback), CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeSensitivityLevelAttribute( + public void subscribeCurrentSensitivityLevelAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSITIVITY_LEVEL_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedSensitivityLevelsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedSensitivityLevelsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_SENSITIVITY_LEVELS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDefaultSensitivityLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); + } + + public void subscribeDefaultSensitivityLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEFAULT_SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } public void readAlarmsActiveAttribute( @@ -27573,25 +27647,66 @@ public void onSuccess(byte[] tlv) { }, ALARMS_ENABLED_ATTRIBUTE_ID, true); } - public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value) { - writeAlarmsEnabledAttribute(callback, value, 0); + public void subscribeAlarmsEnabledAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALARMS_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ALARMS_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void readAlarmsSupportedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALARMS_SUPPORTED_ATTRIBUTE_ID, true); } - public void subscribeAlarmsEnabledAttribute( + public void subscribeAlarmsSupportedAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ENABLED_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPORTED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ALARMS_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + }, ALARMS_SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSensorFaultAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSOR_FAULT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SENSOR_FAULT_ATTRIBUTE_ID, true); + } + + public void subscribeSensorFaultAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSOR_FAULT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SENSOR_FAULT_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 5f9984935302be..bf4e3438eca5ab 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -2968,6 +2968,52 @@ public String toString() { return output.toString(); } } +public static class BooleanSensorConfigurationClusterSensorFaultEvent { + public Integer sensorFault; + private static final long SENSOR_FAULT_ID = 0L; + + public BooleanSensorConfigurationClusterSensorFaultEvent( + Integer sensorFault + ) { + this.sensorFault = sensorFault; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SENSOR_FAULT_ID, new UIntType(sensorFault))); + + return new StructType(values); + } + + public static BooleanSensorConfigurationClusterSensorFaultEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer sensorFault = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SENSOR_FAULT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sensorFault = castingValue.value(Integer.class); + } + } + } + return new BooleanSensorConfigurationClusterSensorFaultEvent( + sensorFault + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BooleanSensorConfigurationClusterSensorFaultEvent {\n"); + output.append("\tsensorFault: "); + output.append(sensorFault); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ValveConfigurationAndControlClusterValveStateChangedEvent { public Integer valveState; private static final long VALVE_STATE_ID = 0L; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 0762d4168da6f5..837df6395de5c9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -8775,10 +8775,14 @@ public long getID() { } public enum Attribute { - SensitivityLevel(0L), - AlarmsActive(1L), - AlarmsSuppressed(2L), - AlarmsEnabled(3L), + CurrentSensitivityLevel(0L), + SupportedSensitivityLevels(1L), + DefaultSensitivityLevel(2L), + AlarmsActive(3L), + AlarmsSuppressed(4L), + AlarmsEnabled(5L), + AlarmsSupported(6L), + SensorFault(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -8827,7 +8831,8 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - SuppressRequest(0L),; + SuppressAlarm(0L), + EnableDisableAlarm(1L),; private final long id; Command(long id) { this.id = id; @@ -8845,17 +8850,34 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SuppressRequestCommandField {AlarmsToSuppress(0),; + }public enum SuppressAlarmCommandField {AlarmsToSuppress(0),; private final int id; - SuppressRequestCommandField(int id) { + SuppressAlarmCommandField(int id) { this.id = id; } public int getID() { return id; } - public static SuppressRequestCommandField value(int id) throws NoSuchFieldError { - for (SuppressRequestCommandField field : SuppressRequestCommandField.values()) { + public static SuppressAlarmCommandField value(int id) throws NoSuchFieldError { + for (SuppressAlarmCommandField field : SuppressAlarmCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum EnableDisableAlarmCommandField {AlarmsToEnableDisable(0),; + private final int id; + EnableDisableAlarmCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EnableDisableAlarmCommandField value(int id) throws NoSuchFieldError { + for (EnableDisableAlarmCommandField field : EnableDisableAlarmCommandField.values()) { if (field.getID() == id) { return field; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 27b051c993d5f5..32bae98faf8897 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -22602,22 +22602,39 @@ public Map> getCommandMap() { Map booleanSensorConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); - Map booleanSensorConfigurationsuppressRequestCommandParams = new LinkedHashMap(); + Map booleanSensorConfigurationsuppressAlarmCommandParams = new LinkedHashMap(); - CommandParameterInfo booleanSensorConfigurationsuppressRequestalarmsToSuppressCommandParameterInfo = new CommandParameterInfo("alarmsToSuppress", Integer.class, Integer.class); - booleanSensorConfigurationsuppressRequestCommandParams.put("alarmsToSuppress",booleanSensorConfigurationsuppressRequestalarmsToSuppressCommandParameterInfo); - InteractionInfo booleanSensorConfigurationsuppressRequestInteractionInfo = new InteractionInfo( + CommandParameterInfo booleanSensorConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo = new CommandParameterInfo("alarmsToSuppress", Integer.class, Integer.class); + booleanSensorConfigurationsuppressAlarmCommandParams.put("alarmsToSuppress",booleanSensorConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo); + InteractionInfo booleanSensorConfigurationsuppressAlarmInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.BooleanSensorConfigurationCluster) cluster) - .suppressRequest((DefaultClusterCallback) callback + .suppressAlarm((DefaultClusterCallback) callback , (Integer) commandArguments.get("alarmsToSuppress") ); }, () -> new DelegatedDefaultClusterCallback(), - booleanSensorConfigurationsuppressRequestCommandParams + booleanSensorConfigurationsuppressAlarmCommandParams ); - booleanSensorConfigurationClusterInteractionInfoMap.put("suppressRequest", booleanSensorConfigurationsuppressRequestInteractionInfo); + booleanSensorConfigurationClusterInteractionInfoMap.put("suppressAlarm", booleanSensorConfigurationsuppressAlarmInteractionInfo); + + Map booleanSensorConfigurationenableDisableAlarmCommandParams = new LinkedHashMap(); + + CommandParameterInfo booleanSensorConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo = new CommandParameterInfo("alarmsToEnableDisable", Integer.class, Integer.class); + booleanSensorConfigurationenableDisableAlarmCommandParams.put("alarmsToEnableDisable",booleanSensorConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo); + InteractionInfo booleanSensorConfigurationenableDisableAlarmInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster) + .enableDisableAlarm((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("alarmsToEnableDisable") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + booleanSensorConfigurationenableDisableAlarmCommandParams + ); + booleanSensorConfigurationClusterInteractionInfoMap.put("enableDisableAlarm", booleanSensorConfigurationenableDisableAlarmInteractionInfo); commandMap.put("booleanSensorConfiguration", booleanSensorConfigurationClusterInteractionInfoMap); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index fecf9c31d761ee..ef04c6547bab99 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -8638,17 +8638,39 @@ private static Map readActivatedCarbonFilterMonitoringI return result; } private static Map readBooleanSensorConfigurationInteractionInfo() { - Map result = new LinkedHashMap<>();Map readBooleanSensorConfigurationSensitivityLevelCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + Map result = new LinkedHashMap<>();Map readBooleanSensorConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readSensitivityLevelAttribute( + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readCurrentSensitivityLevelAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationSensitivityLevelCommandParams + readBooleanSensorConfigurationCurrentSensitivityLevelCommandParams ); - result.put("readSensitivityLevelAttribute", readBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo); + result.put("readCurrentSensitivityLevelAttribute", readBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo); + Map readBooleanSensorConfigurationSupportedSensitivityLevelsCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationSupportedSensitivityLevelsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readSupportedSensitivityLevelsAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationSupportedSensitivityLevelsCommandParams + ); + result.put("readSupportedSensitivityLevelsAttribute", readBooleanSensorConfigurationSupportedSensitivityLevelsAttributeInteractionInfo); + Map readBooleanSensorConfigurationDefaultSensitivityLevelCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationDefaultSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readDefaultSensitivityLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationDefaultSensitivityLevelCommandParams + ); + result.put("readDefaultSensitivityLevelAttribute", readBooleanSensorConfigurationDefaultSensitivityLevelAttributeInteractionInfo); Map readBooleanSensorConfigurationAlarmsActiveCommandParams = new LinkedHashMap(); InteractionInfo readBooleanSensorConfigurationAlarmsActiveAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8682,6 +8704,28 @@ private static Map readBooleanSensorConfigurationIntera readBooleanSensorConfigurationAlarmsEnabledCommandParams ); result.put("readAlarmsEnabledAttribute", readBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo); + Map readBooleanSensorConfigurationAlarmsSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationAlarmsSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsSupportedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationAlarmsSupportedCommandParams + ); + result.put("readAlarmsSupportedAttribute", readBooleanSensorConfigurationAlarmsSupportedAttributeInteractionInfo); + Map readBooleanSensorConfigurationSensorFaultCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationSensorFaultAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readSensorFaultAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationSensorFaultCommandParams + ); + result.put("readSensorFaultAttribute", readBooleanSensorConfigurationSensorFaultAttributeInteractionInfo); Map readBooleanSensorConfigurationGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readBooleanSensorConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 5c6174336ce03a..a668cab94e0add 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -1165,50 +1165,28 @@ public Map> getWriteAttributeMap() { writeActivatedCarbonFilterMonitoringInteractionInfo.put("writeLastChangedTimeAttribute", writeActivatedCarbonFilterMonitoringLastChangedTimeAttributeInteractionInfo); writeAttributeMap.put("activatedCarbonFilterMonitoring", writeActivatedCarbonFilterMonitoringInteractionInfo); Map writeBooleanSensorConfigurationInteractionInfo = new LinkedHashMap<>(); - Map writeBooleanSensorConfigurationSensitivityLevelCommandParams = new LinkedHashMap(); - CommandParameterInfo booleanSensorConfigurationsensitivityLevelCommandParameterInfo = + Map writeBooleanSensorConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo booleanSensorConfigurationcurrentSensitivityLevelCommandParameterInfo = new CommandParameterInfo( "value", Integer.class, Integer.class ); - writeBooleanSensorConfigurationSensitivityLevelCommandParams.put( + writeBooleanSensorConfigurationCurrentSensitivityLevelCommandParams.put( "value", - booleanSensorConfigurationsensitivityLevelCommandParameterInfo + booleanSensorConfigurationcurrentSensitivityLevelCommandParameterInfo ); - InteractionInfo writeBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).writeSensitivityLevelAttribute( + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).writeCurrentSensitivityLevelAttribute( (DefaultClusterCallback) callback, (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBooleanSensorConfigurationSensitivityLevelCommandParams + writeBooleanSensorConfigurationCurrentSensitivityLevelCommandParams ); - writeBooleanSensorConfigurationInteractionInfo.put("writeSensitivityLevelAttribute", writeBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo); - Map writeBooleanSensorConfigurationAlarmsEnabledCommandParams = new LinkedHashMap(); - CommandParameterInfo booleanSensorConfigurationalarmsEnabledCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBooleanSensorConfigurationAlarmsEnabledCommandParams.put( - "value", - booleanSensorConfigurationalarmsEnabledCommandParameterInfo - ); - InteractionInfo writeBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).writeAlarmsEnabledAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBooleanSensorConfigurationAlarmsEnabledCommandParams - ); - writeBooleanSensorConfigurationInteractionInfo.put("writeAlarmsEnabledAttribute", writeBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo); + writeBooleanSensorConfigurationInteractionInfo.put("writeCurrentSensitivityLevelAttribute", writeBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo); writeAttributeMap.put("booleanSensorConfiguration", writeBooleanSensorConfigurationInteractionInfo); Map writeValveConfigurationAndControlInteractionInfo = new LinkedHashMap<>(); Map writeValveConfigurationAndControlOpenDurationCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt new file mode 100644 index 00000000000000..dd9fa9e59bfbe6 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BooleanSensorConfigurationClusterSensorFaultEvent(val sensorFault: UInt) { + override fun toString(): String = buildString { + append("BooleanSensorConfigurationClusterSensorFaultEvent {\n") + append("\tsensorFault : $sensorFault\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SENSOR_FAULT), sensorFault) + endStructure() + } + } + + companion object { + private const val TAG_SENSOR_FAULT = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BooleanSensorConfigurationClusterSensorFaultEvent { + tlvReader.enterStructure(tlvTag) + val sensorFault = tlvReader.getUInt(ContextSpecificTag(TAG_SENSOR_FAULT)) + + tlvReader.exitContainer() + + return BooleanSensorConfigurationClusterSensorFaultEvent(sensorFault) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index f4242b257d9ce1..46c8fb14c98d86 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -132,6 +132,7 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt index 9894a459f38722..876fb2182b745b 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt @@ -41,7 +41,7 @@ class BooleanSensorConfigurationCluster( class AttributeListAttribute(val value: List) - suspend fun suppressRequest(alarmsToSuppress: UByte, timedInvokeTimeoutMs: Int? = null) { + suspend fun suppressAlarm(alarmsToSuppress: UByte, timedInvokeTimeoutMs: Int? = null) { val commandId: UInt = 0u val timeoutMs: Duration = timedInvokeTimeoutMs?.let { Duration.ofMillis(it.toLong()) } ?: Duration.ZERO @@ -64,7 +64,30 @@ class BooleanSensorConfigurationCluster( logger.log(Level.FINE, "Invoke command succeeded: ${response}") } - suspend fun readSensitivityLevelAttribute(): UByte? { + suspend fun enableDisableAlarm(alarmsToEnableDisable: UByte, timedInvokeTimeoutMs: Int? = null) { + val commandId: UInt = 1u + val timeoutMs: Duration = + timedInvokeTimeoutMs?.let { Duration.ofMillis(it.toLong()) } ?: Duration.ZERO + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ALARMS_TO_ENABLE_DISABLE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_ALARMS_TO_ENABLE_DISABLE_REQ), alarmsToEnableDisable) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timeoutMs + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun readCurrentSensitivityLevelAttribute(): UByte? { val ATTRIBUTE_ID: UInt = 0u val attributePath = @@ -86,7 +109,7 @@ class BooleanSensorConfigurationCluster( it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Sensitivitylevel attribute not found in response" } + requireNotNull(attributeData) { "Currentsensitivitylevel attribute not found in response" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) @@ -100,7 +123,10 @@ class BooleanSensorConfigurationCluster( return decodedValue } - suspend fun writeSensitivityLevelAttribute(value: UByte, timedWriteTimeoutMs: Int? = null) { + suspend fun writeCurrentSensitivityLevelAttribute( + value: UByte, + timedWriteTimeoutMs: Int? = null + ) { val ATTRIBUTE_ID: UInt = 0u val timeoutMs: Duration = timedWriteTimeoutMs?.let { Duration.ofMillis(it.toLong()) } ?: Duration.ZERO @@ -142,7 +168,7 @@ class BooleanSensorConfigurationCluster( } } - suspend fun readAlarmsActiveAttribute(): UByte? { + suspend fun readSupportedSensitivityLevelsAttribute(): UByte? { val ATTRIBUTE_ID: UInt = 1u val attributePath = @@ -159,6 +185,78 @@ class BooleanSensorConfigurationCluster( logger.log(Level.FINE, "Read command succeeded") + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Supportedsensitivitylevels attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun readDefaultSensitivityLevelAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 2u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Defaultsensitivitylevel attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun readAlarmsActiveAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 3u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + val attributeData = response.successes.filterIsInstance().firstOrNull { it.path.attributeId == ATTRIBUTE_ID @@ -179,7 +277,7 @@ class BooleanSensorConfigurationCluster( } suspend fun readAlarmsSuppressedAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 2u + val ATTRIBUTE_ID: UInt = 4u val attributePath = AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) @@ -215,7 +313,7 @@ class BooleanSensorConfigurationCluster( } suspend fun readAlarmsEnabledAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 3u + val ATTRIBUTE_ID: UInt = 5u val attributePath = AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) @@ -250,46 +348,76 @@ class BooleanSensorConfigurationCluster( return decodedValue } - suspend fun writeAlarmsEnabledAttribute(value: UByte, timedWriteTimeoutMs: Int? = null) { - val ATTRIBUTE_ID: UInt = 3u - val timeoutMs: Duration = - timedWriteTimeoutMs?.let { Duration.ofMillis(it.toLong()) } ?: Duration.ZERO + suspend fun readAlarmsSupportedAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 6u - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded() - ) - ), - timedRequest = timeoutMs - ) + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - val response: WriteResponse = controller.write(writeRequests) + val response = controller.read(readRequest) - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } + requireNotNull(attributeData) { "Alarmssupported attribute not found in response" } - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null } + + return decodedValue + } + + suspend fun readSensorFaultAttribute(): UShort? { + val ATTRIBUTE_ID: UInt = 7u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Sensorfault attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + return decodedValue } suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt new file mode 100644 index 00000000000000..0be2a8b6c483d9 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BooleanSensorConfigurationClusterSensorFaultEvent(val sensorFault: UShort) { + override fun toString(): String = buildString { + append("BooleanSensorConfigurationClusterSensorFaultEvent {\n") + append("\tsensorFault : $sensorFault\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SENSOR_FAULT), sensorFault) + endStructure() + } + } + + companion object { + private const val TAG_SENSOR_FAULT = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BooleanSensorConfigurationClusterSensorFaultEvent { + tlvReader.enterStructure(tlvTag) + val sensorFault = tlvReader.getUShort(ContextSpecificTag(TAG_SENSOR_FAULT)) + + tlvReader.exitContainer() + + return BooleanSensorConfigurationClusterSensorFaultEvent(sensorFault) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni index d13dca88a95532..fac796ccfe5133 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni @@ -132,6 +132,7 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index e87c3ea5961c68..2e3d80723d9657 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -18785,8 +18785,40 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR using namespace app::Clusters::BooleanSensorConfiguration; switch (aPath.mAttributeId) { - case Attributes::SensitivityLevel::Id: { - using TypeInfo = Attributes::SensitivityLevel::TypeInfo; + case Attributes::CurrentSensitivityLevel::Id: { + using TypeInfo = Attributes::CurrentSensitivityLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SupportedSensitivityLevels::Id: { + using TypeInfo = Attributes::SupportedSensitivityLevels::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::DefaultSensitivityLevel::Id: { + using TypeInfo = Attributes::DefaultSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18849,6 +18881,38 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + case Attributes::AlarmsSupported::Id: { + using TypeInfo = Attributes::AlarmsSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SensorFault::Id: { + using TypeInfo = Attributes::SensorFault::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index c8b407678f3d20..c7002477c201ef 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -3288,12 +3288,12 @@ JNI_METHOD(void, ActivatedCarbonFilterMonitoringCluster, writeLastChangedTimeAtt onFailure.release(); } -JNI_METHOD(void, BooleanSensorConfigurationCluster, writeSensitivityLevelAttribute) +JNI_METHOD(void, BooleanSensorConfigurationCluster, writeCurrentSensitivityLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + using TypeInfo = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; @@ -3340,58 +3340,6 @@ JNI_METHOD(void, BooleanSensorConfigurationCluster, writeSensitivityLevelAttribu onFailure.release(); } -JNI_METHOD(void, BooleanSensorConfigurationCluster, writeAlarmsEnabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue.SetRaw(static_cast::IntegerType>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value))); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - BooleanSensorConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, ValveConfigurationAndControlCluster, writeOpenDurationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 26bd0d48009066..9b06d341084e04 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -3730,6 +3730,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } + jobject value_sensorFault; + std::string value_sensorFaultClassName = "java/lang/Integer"; + std::string value_sensorFaultCtorSignature = "(I)V"; + jint jnivalue_sensorFault = static_cast(cppValue.sensorFault.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sensorFaultClassName.c_str(), + value_sensorFaultCtorSignature.c_str(), jnivalue_sensorFault, + value_sensorFault); + jclass sensorFaultStructClass; err = chip::JniReferences::GetInstance().GetClassRef( env, "chip/devicecontroller/ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent", @@ -3739,14 +3747,14 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent"); return nullptr; } - jmethodID sensorFaultStructCtor = env->GetMethodID(sensorFaultStructClass, "", "()V"); + jmethodID sensorFaultStructCtor = env->GetMethodID(sensorFaultStructClass, "", "(Ljava/lang/Integer;)V"); if (sensorFaultStructCtor == nullptr) { ChipLogError(Zcl, "Could not find ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent constructor"); return nullptr; } - jobject value = env->NewObject(sensorFaultStructClass, sensorFaultStructCtor); + jobject value = env->NewObject(sensorFaultStructClass, sensorFaultStructCtor, value_sensorFault); return value; } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index e6a384cd3336a9..7c6f4df54ba170 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -6141,38 +6141,68 @@ class ChipClusters: "commands": { 0x00000000: { "commandId": 0x00000000, - "commandName": "SuppressRequest", + "commandName": "SuppressAlarm", "args": { "alarmsToSuppress": "int", }, }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "EnableDisableAlarm", + "args": { + "alarmsToEnableDisable": "int", + }, + }, }, "attributes": { 0x00000000: { - "attributeName": "SensitivityLevel", + "attributeName": "CurrentSensitivityLevel", "attributeId": 0x00000000, "type": "int", "reportable": True, "writable": True, }, 0x00000001: { - "attributeName": "AlarmsActive", + "attributeName": "SupportedSensitivityLevels", "attributeId": 0x00000001, "type": "int", "reportable": True, }, 0x00000002: { - "attributeName": "AlarmsSuppressed", + "attributeName": "DefaultSensitivityLevel", "attributeId": 0x00000002, "type": "int", "reportable": True, }, 0x00000003: { - "attributeName": "AlarmsEnabled", + "attributeName": "AlarmsActive", "attributeId": 0x00000003, "type": "int", "reportable": True, - "writable": True, + }, + 0x00000004: { + "attributeName": "AlarmsSuppressed", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "AlarmsEnabled", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + }, + 0x00000006: { + "attributeName": "AlarmsSupported", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "SensorFault", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index f346a96ecb3785..f865f566a56627 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -21490,10 +21490,14 @@ class BooleanSensorConfiguration(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="sensitivityLevel", Tag=0x00000000, Type=typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]), - ClusterObjectFieldDescriptor(Label="alarmsActive", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="alarmsSuppressed", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="alarmsEnabled", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentSensitivityLevel", Tag=0x00000000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="supportedSensitivityLevels", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="defaultSensitivityLevel", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsActive", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsSuppressed", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsEnabled", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsSupported", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sensorFault", Tag=0x00000007, Type=typing.Optional[uint]), 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]), @@ -21502,10 +21506,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - sensitivityLevel: 'typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]' = None + currentSensitivityLevel: 'typing.Optional[uint]' = None + supportedSensitivityLevels: 'typing.Optional[uint]' = None + defaultSensitivityLevel: 'typing.Optional[uint]' = None alarmsActive: 'typing.Optional[uint]' = None alarmsSuppressed: 'typing.Optional[uint]' = None alarmsEnabled: 'typing.Optional[uint]' = None + alarmsSupported: 'typing.Optional[uint]' = None + sensorFault: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -21513,17 +21521,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class SensitivityEnum(MatterIntEnum): - kHigh = 0x00 - kStandard = 0x01 - kLow = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - class Bitmaps: class AlarmModeBitmap(IntFlag): kVisual = 0x1 @@ -21535,9 +21532,12 @@ class Feature(IntFlag): kAlarmSuppress = 0x4 kSensitivityLevel = 0x8 + class SensorFaultBitmap(IntFlag): + kGneralFault = 0x1 + class Commands: @dataclass - class SuppressRequest(ClusterCommand): + class SuppressAlarm(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000080 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True @@ -21552,9 +21552,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: alarmsToSuppress: 'uint' = 0 + @dataclass + class EnableDisableAlarm(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000080 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="alarmsToEnableDisable", Tag=0, Type=uint), + ]) + + alarmsToEnableDisable: 'uint' = 0 + class Attributes: @dataclass - class SensitivityLevel(ClusterAttributeDescriptor): + class CurrentSensitivityLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000080 @@ -21565,12 +21581,12 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]' = None + value: 'typing.Optional[uint]' = None @dataclass - class AlarmsActive(ClusterAttributeDescriptor): + class SupportedSensitivityLevels(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000080 @@ -21586,7 +21602,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class AlarmsSuppressed(ClusterAttributeDescriptor): + class DefaultSensitivityLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000080 @@ -21602,7 +21618,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class AlarmsEnabled(ClusterAttributeDescriptor): + class AlarmsActive(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000080 @@ -21617,6 +21633,70 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AlarmsSuppressed(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @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 SensorFault(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21749,8 +21829,11 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="sensorFault", Tag=0, Type=uint), ]) + sensorFault: 'uint' = 0 + @dataclass class ValveConfigurationAndControl(Cluster): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 1f7d91156734b9..16f802fdca5290 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -2823,7 +2823,13 @@ static BOOL AttributeIsSpecifiedInBooleanSensorConfigurationCluster(AttributeId { using namespace Clusters::BooleanSensorConfiguration; switch (aAttributeId) { - case Attributes::SensitivityLevel::Id: { + case Attributes::CurrentSensitivityLevel::Id: { + return YES; + } + case Attributes::SupportedSensitivityLevels::Id: { + return YES; + } + case Attributes::DefaultSensitivityLevel::Id: { return YES; } case Attributes::AlarmsActive::Id: { @@ -2835,6 +2841,12 @@ static BOOL AttributeIsSpecifiedInBooleanSensorConfigurationCluster(AttributeId case Attributes::AlarmsEnabled::Id: { return YES; } + case Attributes::AlarmsSupported::Id: { + return YES; + } + case Attributes::SensorFault::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 2deb87873533aa..54ccf48c5fad48 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -7385,15 +7385,37 @@ static id _Nullable DecodeAttributeValueForBooleanSensorConfigurationCluster(Att { using namespace Clusters::BooleanSensorConfiguration; switch (aAttributeId) { - case Attributes::SensitivityLevel::Id: { - using TypeInfo = Attributes::SensitivityLevel::TypeInfo; + case Attributes::CurrentSensitivityLevel::Id: { + using TypeInfo = Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::SupportedSensitivityLevels::Id: { + using TypeInfo = Attributes::SupportedSensitivityLevels::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::DefaultSensitivityLevel::Id: { + using TypeInfo = Attributes::DefaultSensitivityLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } case Attributes::AlarmsActive::Id: { @@ -7429,6 +7451,28 @@ static id _Nullable DecodeAttributeValueForBooleanSensorConfigurationCluster(Att value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } + case Attributes::AlarmsSupported::Id: { + using TypeInfo = Attributes::AlarmsSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::SensorFault::Id: { + using TypeInfo = Attributes::SensorFault::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index ad4120b06c3ee5..cf6c684ef10fa5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -6993,19 +6993,37 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRBaseClusterBooleanSensorConfiguration : MTRGenericBaseCluster /** - * Command SuppressRequest + * Command SuppressAlarm * - * This command is used to suppress the specified alarm. + * This command is used to suppress the specified alarm mode. */ -- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command EnableDisableAlarm + * + * This command is used to enable or disable the specified alarm mode. + */ +- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeSensitivityLevelWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams *)params @@ -7020,13 +7038,23 @@ MTR_PROVISIONALLY_AVAILABLE + (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 @@ -16811,12 +16839,6 @@ typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRBooleanSensorConfigurationSensitivity) { - MTRBooleanSensorConfigurationSensitivityHigh MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRBooleanSensorConfigurationSensitivityStandard MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRBooleanSensorConfigurationSensitivityLow MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - typedef NS_OPTIONS(uint8_t, MTRBooleanSensorConfigurationAlarmModeBitmap) { MTRBooleanSensorConfigurationAlarmModeBitmapVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRBooleanSensorConfigurationAlarmModeBitmapAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, @@ -16829,6 +16851,10 @@ typedef NS_OPTIONS(uint32_t, MTRBooleanSensorConfigurationFeature) { MTRBooleanSensorConfigurationFeatureSensitivityLevel MTR_PROVISIONALLY_AVAILABLE = 0x8, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint16_t, MTRBooleanSensorConfigurationSensorFaultBitmap) { + MTRBooleanSensorConfigurationSensorFaultBitmapGneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlValveState) { MTRValveConfigurationAndControlValveStateOpen MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRValveConfigurationAndControlValveStateClosed MTR_PROVISIONALLY_AVAILABLE = 0x01, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 45c8b38f7a85dc..07034e77f683ae 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -49084,10 +49084,10 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @implementation MTRBaseClusterBooleanSensorConfiguration -- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams + params = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams alloc] init]; } @@ -49097,7 +49097,31 @@ - (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressR auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BooleanSensorConfiguration::Commands::SuppressRequest::Type; + using RequestType = BooleanSensorConfiguration::Commands::SuppressAlarm::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -49109,9 +49133,9 @@ - (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressR completion:responseHandler]; } -- (void)readAttributeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49120,11 +49144,11 @@ - (void)readAttributeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49139,20 +49163,56 @@ - (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value param } ListFreer listFreer; - using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + using TypeInfo = BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49162,9 +49222,45 @@ - (void)subscribeAttributeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + using TypeInfo = BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49256,39 +49352,83 @@ - (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - ListFreer listFreer; - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); +- (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSupported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); ++ (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSupported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = BooleanSensorConfiguration::Attributes::SensorFault::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::SensorFault::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49298,9 +49438,9 @@ - (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = BooleanSensorConfiguration::Attributes::SensorFault::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index d01196579b4023..a93a6981e2eee9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2577,10 +2577,14 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster BooleanSensorConfiguration attributes - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsActiveID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSuppressedID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeCurrentSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSupportedSensitivityLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeDefaultSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsActiveID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSuppressedID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -6247,7 +6251,8 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, // Cluster BooleanSensorConfiguration commands - MTRCommandIDTypeClusterBooleanSensorConfigurationCommandSuppressRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterBooleanSensorConfigurationCommandSuppressAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterBooleanSensorConfigurationCommandEnableDisableAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster ValveConfigurationAndControl commands MTRCommandIDTypeClusterValveConfigurationAndControlCommandOpenID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 12e03cd11b4e27..2354c9e855e76e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3317,19 +3317,26 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRClusterBooleanSensorConfiguration : MTRGenericCluster -- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSupportedSensitivityLevelsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeDefaultSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAlarmsSuppressedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAlarmsEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSensorFaultWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(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 fbf736a5882e3e..b9bac2ab63cfd3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -8950,10 +8950,10 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d @implementation MTRClusterBooleanSensorConfiguration -- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams + params = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams alloc] init]; } @@ -8963,7 +8963,7 @@ - (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressR auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BooleanSensorConfiguration::Commands::SuppressRequest::Type; + using RequestType = BooleanSensorConfiguration::Commands::SuppressAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8977,20 +8977,57 @@ - (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressR completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensitivityLevelID) params:params]; + if (params == nil) { + params = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeCurrentSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeCurrentSensitivityLevelID) params:params]; } -- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeCurrentSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeCurrentSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedSensitivityLevelsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSupportedSensitivityLevelsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDefaultSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeDefaultSensitivityLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params @@ -9008,15 +9045,14 @@ - (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *) return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID) params:params]; } -- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeAlarmsSupportedWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeAlarmsEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSupportedID) params:params]; } -- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeSensorFaultWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensorFaultID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 5778c777f0e0b3..ea111960e3143a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -5596,7 +5596,7 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRBooleanSensorConfigurationClusterSuppressRequestParams : NSObject +@interface MTRBooleanSensorConfigurationClusterSuppressAlarmParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull alarmsToSuppress MTR_PROVISIONALLY_AVAILABLE; /** @@ -5625,6 +5625,36 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull alarmsToEnableDisable MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRValveConfigurationAndControlClusterOpenParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 319c22ab6ecc41..a3555a2b386462 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -15382,7 +15382,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBooleanSensorConfigurationClusterSuppressRequestParams +@implementation MTRBooleanSensorConfigurationClusterSuppressAlarmParams - (instancetype)init { if (self = [super init]) { @@ -15396,7 +15396,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams alloc] init]; + auto other = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams alloc] init]; other.alarmsToSuppress = self.alarmsToSuppress; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -15413,11 +15413,11 @@ - (NSString *)description @end -@implementation MTRBooleanSensorConfigurationClusterSuppressRequestParams (InternalMethods) +@implementation MTRBooleanSensorConfigurationClusterSuppressAlarmParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Type encodableStruct; + chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Type encodableStruct; ListFreer listFreer; { encodableStruct.alarmsToSuppress = static_cast>(self.alarmsToSuppress.unsignedCharValue); @@ -15461,6 +15461,85 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams +- (instancetype)init +{ + if (self = [super init]) { + + _alarmsToEnableDisable = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams alloc] init]; + + other.alarmsToEnableDisable = self.alarmsToEnableDisable; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToEnableDisable:%@; >", NSStringFromClass([self class]), _alarmsToEnableDisable]; + return descriptionString; +} + +@end + +@implementation MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.alarmsToEnableDisable = static_cast>(self.alarmsToEnableDisable.unsignedCharValue); + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + @implementation MTRValveConfigurationAndControlClusterOpenParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 54b6b8159bc576..c4a087a7b3d9b9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -994,7 +994,13 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRBooleanSensorConfigurationClusterSuppressRequestParams (InternalMethods) +@interface MTRBooleanSensorConfigurationClusterSuppressAlarmParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 8119e5be2e3021..9edd4c28356b01 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -2405,6 +2405,12 @@ static id _Nullable DecodeEventPayloadForBooleanSensorConfigurationCluster(Event __auto_type * value = [MTRBooleanSensorConfigurationClusterSensorFaultEvent new]; + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.sensorFault.Raw()]; + value.sensorFault = memberValue; + } while (0); + return value; } default: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index b21a35ab11b40f..f626ac4a153bed 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1060,6 +1060,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRBooleanSensorConfigurationClusterSensorFaultEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sensorFault MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 074a9001c288b5..17b9b7025a573e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -4237,6 +4237,8 @@ @implementation MTRBooleanSensorConfigurationClusterSensorFaultEvent - (instancetype)init { if (self = [super init]) { + + _sensorFault = @(0); } return self; } @@ -4245,12 +4247,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRBooleanSensorConfigurationClusterSensorFaultEvent alloc] init]; + other.sensorFault = self.sensorFault; + return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sensorFault:%@; >", NSStringFromClass([self class]), _sensorFault]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 66f3ff69bb6949..f5038359ea059b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -9378,11 +9378,73 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace BooleanSensorConfiguration { namespace Attributes { -namespace SensitivityLevel { +namespace CurrentSensitivityLevel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentSensitivityLevel + +namespace SupportedSensitivityLevels { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace SupportedSensitivityLevels + +namespace DefaultSensitivityLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); @@ -9394,9 +9456,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorC *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9404,10 +9466,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorC Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace SensitivityLevel +} // namespace DefaultSensitivityLevel namespace AlarmsActive { @@ -9505,6 +9567,71 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace AlarmsSupported + +namespace SensorFault { + +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, + chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace SensorFault + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 4222d40ea76f9f..22da5943054af3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1835,11 +1835,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace BooleanSensorConfiguration { namespace Attributes { -namespace SensitivityLevel { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum * value); // SensitivityEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum value); -} // namespace SensitivityLevel +namespace CurrentSensitivityLevel { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentSensitivityLevel + +namespace SupportedSensitivityLevels { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace SupportedSensitivityLevels + +namespace DefaultSensitivityLevel { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace DefaultSensitivityLevel namespace AlarmsActive { EmberAfStatus Get(chip::EndpointId endpoint, @@ -1859,6 +1868,19 @@ EmberAfStatus Get(chip::EndpointId endpoint, EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace AlarmsEnabled +namespace AlarmsSupported { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsSupported + +namespace SensorFault { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // SensorFaultBitmap +EmberAfStatus Set(chip::EndpointId endpoint, + chip::BitMask value); +} // namespace SensorFault + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index ff5751ddcb52ee..8b400399b54c55 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -10109,11 +10109,17 @@ bool emberAfMicrowaveOvenControlClusterAddMoreTimeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::DecodableType & commandData); /** - * @brief Boolean Sensor Configuration Cluster SuppressRequest Command callback (from client) + * @brief Boolean Sensor Configuration Cluster SuppressAlarm Command callback (from client) */ -bool emberAfBooleanSensorConfigurationClusterSuppressRequestCallback( +bool emberAfBooleanSensorConfigurationClusterSuppressAlarmCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::DecodableType & commandData); + const chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::DecodableType & commandData); +/** + * @brief Boolean Sensor Configuration Cluster EnableDisableAlarm Command callback (from client) + */ +bool emberAfBooleanSensorConfigurationClusterEnableDisableAlarmCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::DecodableType & commandData); /** * @brief Valve Configuration and Control Cluster Open Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 48a2a5094ad527..801a7594706266 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1508,20 +1508,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ActivatedCarbonFilterMo } } -static auto __attribute__((unused)) EnsureKnownEnumValue(BooleanSensorConfiguration::SensitivityEnum val) -{ - using EnumType = BooleanSensorConfiguration::SensitivityEnum; - switch (val) - { - case EnumType::kHigh: - case EnumType::kStandard: - case EnumType::kLow: - return val; - default: - return static_cast(3); - } -} - static auto __attribute__((unused)) EnsureKnownEnumValue(ValveConfigurationAndControl::ValveStateEnum val) { using EnumType = ValveConfigurationAndControl::ValveStateEnum; 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 adcca6f89087af..cddc491525028e 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 @@ -2127,19 +2127,6 @@ enum class Feature : uint32_t namespace BooleanSensorConfiguration { -// Enum for SensitivityEnum -enum class SensitivityEnum : uint8_t -{ - kHigh = 0x00, - kStandard = 0x01, - kLow = 0x02, - // All received enum values that are not listed above will be mapped - // to kUnknownEnumValue. This is a helper enum value that should only - // be used by code to process how it handles receiving and unknown - // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, -}; - // Bitmap for AlarmModeBitmap enum class AlarmModeBitmap : uint8_t { @@ -2155,6 +2142,12 @@ enum class Feature : uint32_t kAlarmSuppress = 0x4, kSensitivityLevel = 0x8, }; + +// Bitmap for SensorFaultBitmap +enum class SensorFaultBitmap : uint16_t +{ + kGneralFault = 0x1, +}; } // namespace BooleanSensorConfiguration namespace ValveConfigurationAndControl { 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 78bf30815c3084..41b80a9db8dc67 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 @@ -13652,7 +13652,7 @@ namespace Events {} // namespace Events namespace BooleanSensorConfiguration { namespace Commands { -namespace SuppressRequest { +namespace SuppressAlarm { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -13685,7 +13685,41 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SuppressRequest. +} // namespace SuppressAlarm. +namespace EnableDisableAlarm { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kAlarmsToEnableDisable), alarmsToEnableDisable); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kAlarmsToEnableDisable)) + { + err = DataModel::Decode(reader, alarmsToEnableDisable); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace EnableDisableAlarm. } // namespace Commands namespace Attributes { @@ -13693,14 +13727,22 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::SensitivityLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, sensitivityLevel); + case Attributes::CurrentSensitivityLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentSensitivityLevel); + case Attributes::SupportedSensitivityLevels::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedSensitivityLevels); + case Attributes::DefaultSensitivityLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultSensitivityLevel); case Attributes::AlarmsActive::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, alarmsActive); case Attributes::AlarmsSuppressed::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, alarmsSuppressed); case Attributes::AlarmsEnabled::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, alarmsEnabled); + case Attributes::AlarmsSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsSupported); + case Attributes::SensorFault::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sensorFault); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -13765,6 +13807,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSensorFault), sensorFault)); return aWriter.EndContainer(outer); } @@ -13778,6 +13821,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSensorFault)) + { + err = DataModel::Decode(reader, sensorFault); + } + else + { + } + + ReturnErrorOnFailure(err); } } } // namespace SensorFault. 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 afb183bc0de418..2dc17e952a6e6d 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 @@ -19512,15 +19512,20 @@ namespace BooleanSensorConfiguration { namespace Commands { // Forward-declarations so we can reference these later. -namespace SuppressRequest { +namespace SuppressAlarm { struct Type; struct DecodableType; -} // namespace SuppressRequest +} // namespace SuppressAlarm + +namespace EnableDisableAlarm { +struct Type; +struct DecodableType; +} // namespace EnableDisableAlarm } // namespace Commands namespace Commands { -namespace SuppressRequest { +namespace SuppressAlarm { enum class Fields : uint8_t { kAlarmsToSuppress = 0, @@ -19530,7 +19535,7 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SuppressRequest::Id; } + static constexpr CommandId GetCommandId() { return Commands::SuppressAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } chip::BitMask alarmsToSuppress = static_cast>(0); @@ -19545,29 +19550,85 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SuppressRequest::Id; } + static constexpr CommandId GetCommandId() { return Commands::SuppressAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } chip::BitMask alarmsToSuppress = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SuppressRequest +}; // namespace SuppressAlarm +namespace EnableDisableAlarm { +enum class Fields : uint8_t +{ + kAlarmsToEnableDisable = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnableDisableAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + + chip::BitMask alarmsToEnableDisable = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::EnableDisableAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + + chip::BitMask alarmsToEnableDisable = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnableDisableAlarm } // namespace Commands namespace Attributes { -namespace SensitivityLevel { +namespace CurrentSensitivityLevel { struct TypeInfo { - using Type = chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum; - using DecodableType = chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum; - using DecodableArgType = chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SensitivityLevel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentSensitivityLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SensitivityLevel +} // namespace CurrentSensitivityLevel +namespace SupportedSensitivityLevels { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedSensitivityLevels::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedSensitivityLevels +namespace DefaultSensitivityLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultSensitivityLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DefaultSensitivityLevel namespace AlarmsActive { struct TypeInfo { @@ -19604,6 +19665,30 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace AlarmsEnabled +namespace AlarmsSupported { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsSupported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AlarmsSupported +namespace SensorFault { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SensorFault::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SensorFault namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -19649,14 +19734,19 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SensitivityLevel::TypeInfo::DecodableType sensitivityLevel = - static_cast(0); + Attributes::CurrentSensitivityLevel::TypeInfo::DecodableType currentSensitivityLevel = static_cast(0); + Attributes::SupportedSensitivityLevels::TypeInfo::DecodableType supportedSensitivityLevels = static_cast(0); + Attributes::DefaultSensitivityLevel::TypeInfo::DecodableType defaultSensitivityLevel = static_cast(0); Attributes::AlarmsActive::TypeInfo::DecodableType alarmsActive = static_cast>(0); Attributes::AlarmsSuppressed::TypeInfo::DecodableType alarmsSuppressed = static_cast>(0); Attributes::AlarmsEnabled::TypeInfo::DecodableType alarmsEnabled = static_cast>(0); + Attributes::AlarmsSupported::TypeInfo::DecodableType alarmsSupported = + static_cast>(0); + Attributes::SensorFault::TypeInfo::DecodableType sensorFault = + static_cast>(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -19708,6 +19798,7 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kSensorFault = 0, }; struct Type @@ -19718,6 +19809,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } static constexpr bool kIsFabricScoped = false; + chip::BitMask sensorFault = static_cast>(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -19728,6 +19821,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::SensorFault::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + chip::BitMask sensorFault = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace SensorFault 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 732997cd74bf35..22bc329312921f 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 @@ -3516,22 +3516,38 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace BooleanSensorConfiguration { namespace Attributes { -namespace SensitivityLevel { +namespace CurrentSensitivityLevel { static constexpr AttributeId Id = 0x00000000; -} // namespace SensitivityLevel +} // namespace CurrentSensitivityLevel -namespace AlarmsActive { +namespace SupportedSensitivityLevels { static constexpr AttributeId Id = 0x00000001; +} // namespace SupportedSensitivityLevels + +namespace DefaultSensitivityLevel { +static constexpr AttributeId Id = 0x00000002; +} // namespace DefaultSensitivityLevel + +namespace AlarmsActive { +static constexpr AttributeId Id = 0x00000003; } // namespace AlarmsActive namespace AlarmsSuppressed { -static constexpr AttributeId Id = 0x00000002; +static constexpr AttributeId Id = 0x00000004; } // namespace AlarmsSuppressed namespace AlarmsEnabled { -static constexpr AttributeId Id = 0x00000003; +static constexpr AttributeId Id = 0x00000005; } // namespace AlarmsEnabled +namespace AlarmsSupported { +static constexpr AttributeId Id = 0x00000006; +} // namespace AlarmsSupported + +namespace SensorFault { +static constexpr AttributeId Id = 0x00000007; +} // namespace SensorFault + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 79c4cd73302615..139997c474846f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -916,9 +916,13 @@ static constexpr CommandId Id = 0x00000000; namespace BooleanSensorConfiguration { namespace Commands { -namespace SuppressRequest { +namespace SuppressAlarm { static constexpr CommandId Id = 0x00000000; -} // namespace SuppressRequest +} // namespace SuppressAlarm + +namespace EnableDisableAlarm { +static constexpr CommandId Id = 0x00000001; +} // namespace EnableDisableAlarm } // namespace Commands } // namespace BooleanSensorConfiguration diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 645a06603e14c0..60a098f9eeabbf 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -6374,13 +6374,18 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand | Cluster BooleanSensorConfiguration | 0x0080 | |------------------------------------------------------------------------------| | Commands: | | -| * SuppressRequest | 0x00 | +| * SuppressAlarm | 0x00 | +| * EnableDisableAlarm | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * SensitivityLevel | 0x0000 | -| * AlarmsActive | 0x0001 | -| * AlarmsSuppressed | 0x0002 | -| * AlarmsEnabled | 0x0003 | +| * CurrentSensitivityLevel | 0x0000 | +| * SupportedSensitivityLevels | 0x0001 | +| * DefaultSensitivityLevel | 0x0002 | +| * AlarmsActive | 0x0003 | +| * AlarmsSuppressed | 0x0004 | +| * AlarmsEnabled | 0x0005 | +| * AlarmsSupported | 0x0006 | +| * SensorFault | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -6394,13 +6399,13 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command SuppressRequest + * Command SuppressAlarm */ -class BooleanSensorConfigurationSuppressRequest : public ClusterCommand +class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand { public: - BooleanSensorConfigurationSuppressRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("suppress-request", credsIssuerConfig) + BooleanSensorConfigurationSuppressAlarm(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("suppress-alarm", credsIssuerConfig) { AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); ClusterCommand::AddArguments(); @@ -6409,7 +6414,7 @@ class BooleanSensorConfigurationSuppressRequest : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6419,7 +6424,7 @@ class BooleanSensorConfigurationSuppressRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6428,7 +6433,45 @@ class BooleanSensorConfigurationSuppressRequest : public ClusterCommand } private: - chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Type mRequest; + chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Type mRequest; +}; + +/* + * Command EnableDisableAlarm + */ +class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand +{ +public: + BooleanSensorConfigurationEnableDisableAlarm(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enable-disable-alarm", credsIssuerConfig) + { + AddArgument("AlarmsToEnableDisable", 0, UINT8_MAX, &mRequest.alarmsToEnableDisable); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -19182,33 +19225,48 @@ void registerClusterBooleanSensorConfiguration(Commands & commands, CredentialIs // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "sensitivity-level", Attributes::SensitivityLevel::Id, credsIssuerConfig), // - make_unique(Id, "alarms-active", Attributes::AlarmsActive::Id, credsIssuerConfig), // - make_unique(Id, "alarms-suppressed", Attributes::AlarmsSuppressed::Id, credsIssuerConfig), // - make_unique(Id, "alarms-enabled", Attributes::AlarmsEnabled::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), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>( - Id, "sensitivity-level", 0, UINT8_MAX, Attributes::SensitivityLevel::Id, WriteCommandType::kWrite, - credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-sensitivity-level", Attributes::CurrentSensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "supported-sensitivity-levels", Attributes::SupportedSensitivityLevels::Id, + credsIssuerConfig), // + make_unique(Id, "default-sensitivity-level", Attributes::DefaultSensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "alarms-active", Attributes::AlarmsActive::Id, credsIssuerConfig), // + make_unique(Id, "alarms-suppressed", Attributes::AlarmsSuppressed::Id, credsIssuerConfig), // + make_unique(Id, "alarms-enabled", Attributes::AlarmsEnabled::Id, credsIssuerConfig), // + make_unique(Id, "alarms-supported", Attributes::AlarmsSupported::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Attributes::SensorFault::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), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "current-sensitivity-level", 0, UINT8_MAX, Attributes::CurrentSensitivityLevel::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "supported-sensitivity-levels", 0, UINT8_MAX, + Attributes::SupportedSensitivityLevels::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "default-sensitivity-level", 0, UINT8_MAX, Attributes::DefaultSensitivityLevel::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "alarms-active", 0, UINT8_MAX, Attributes::AlarmsActive::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "alarms-suppressed", 0, UINT8_MAX, Attributes::AlarmsSuppressed::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( - Id, "alarms-enabled", 0, UINT8_MAX, Attributes::AlarmsEnabled::Id, WriteCommandType::kWrite, credsIssuerConfig), // + Id, "alarms-enabled", 0, UINT8_MAX, Attributes::AlarmsEnabled::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "alarms-supported", 0, UINT8_MAX, Attributes::AlarmsSupported::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "sensor-fault", 0, UINT16_MAX, Attributes::SensorFault::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -19221,12 +19279,19 @@ void registerClusterBooleanSensorConfiguration(Commands & commands, CredentialIs make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "sensitivity-level", Attributes::SensitivityLevel::Id, credsIssuerConfig), // + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-sensitivity-level", Attributes::CurrentSensitivityLevel::Id, + credsIssuerConfig), // + make_unique(Id, "supported-sensitivity-levels", Attributes::SupportedSensitivityLevels::Id, + credsIssuerConfig), // + make_unique(Id, "default-sensitivity-level", Attributes::DefaultSensitivityLevel::Id, + credsIssuerConfig), // make_unique(Id, "alarms-active", Attributes::AlarmsActive::Id, credsIssuerConfig), // make_unique(Id, "alarms-suppressed", Attributes::AlarmsSuppressed::Id, credsIssuerConfig), // make_unique(Id, "alarms-enabled", Attributes::AlarmsEnabled::Id, credsIssuerConfig), // + make_unique(Id, "alarms-supported", Attributes::AlarmsSupported::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Attributes::SensorFault::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 63017e72e36b37..db35a30c8336e6 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5508,6 +5508,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const BooleanSensorConfiguration::Events::SensorFault::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("SensorFault", indent + 1, value.sensorFault); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'SensorFault'"); + return err; + } + } DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -11529,10 +11537,20 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP case BooleanSensorConfiguration::Id: { switch (path.mAttributeId) { - case BooleanSensorConfiguration::Attributes::SensitivityLevel::Id: { - chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum value; + case BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentSensitivityLevel", 1, value); + } + case BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SensitivityLevel", 1, value); + return DataModelLogger::LogValue("SupportedSensitivityLevels", 1, value); + } + case BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("DefaultSensitivityLevel", 1, value); } case BooleanSensorConfiguration::Attributes::AlarmsActive::Id: { chip::BitMask value; @@ -11549,6 +11567,16 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AlarmsEnabled", 1, value); } + case BooleanSensorConfiguration::Attributes::AlarmsSupported::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AlarmsSupported", 1, value); + } + case BooleanSensorConfiguration::Attributes::SensorFault::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SensorFault", 1, value); + } case BooleanSensorConfiguration::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 80646cb029a5d7..167a572b063ed7 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -73315,13 +73315,18 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public | Cluster BooleanSensorConfiguration | 0x0080 | |------------------------------------------------------------------------------| | Commands: | | -| * SuppressRequest | 0x00 | +| * SuppressAlarm | 0x00 | +| * EnableDisableAlarm | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * SensitivityLevel | 0x0000 | -| * AlarmsActive | 0x0001 | -| * AlarmsSuppressed | 0x0002 | -| * AlarmsEnabled | 0x0003 | +| * CurrentSensitivityLevel | 0x0000 | +| * SupportedSensitivityLevels | 0x0001 | +| * DefaultSensitivityLevel | 0x0002 | +| * AlarmsActive | 0x0003 | +| * AlarmsSuppressed | 0x0004 | +| * AlarmsEnabled | 0x0005 | +| * AlarmsSupported | 0x0006 | +| * SensorFault | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -73336,12 +73341,12 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public #if MTR_ENABLE_PROVISIONAL /* - * Command SuppressRequest + * Command SuppressAlarm */ -class BooleanSensorConfigurationSuppressRequest : public ClusterCommand { +class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand { public: - BooleanSensorConfigurationSuppressRequest() - : ClusterCommand("suppress-request") + BooleanSensorConfigurationSuppressAlarm() + : ClusterCommand("suppress-alarm") { #if MTR_ENABLE_PROVISIONAL AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); @@ -73352,13 +73357,13 @@ class BooleanSensorConfigurationSuppressRequest : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams alloc] init]; + __auto_type * params = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.alarmsToSuppress = [NSNumber numberWithUnsignedChar:mRequest.alarmsToSuppress.Raw()]; @@ -73366,24 +73371,77 @@ class BooleanSensorConfigurationSuppressRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster suppressRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster suppressAlarmWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Type mRequest; + chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command EnableDisableAlarm + */ +class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand { +public: + BooleanSensorConfigurationEnableDisableAlarm() + : ClusterCommand("enable-disable-alarm") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AlarmsToEnableDisable", 0, UINT8_MAX, &mRequest.alarmsToEnableDisable); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.alarmsToEnableDisable = [NSNumber numberWithUnsignedChar:mRequest.alarmsToEnableDisable.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableDisableAlarmWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -73391,34 +73449,34 @@ class BooleanSensorConfigurationSuppressRequest : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SensitivityLevel + * Attribute CurrentSensitivityLevel */ -class ReadBooleanSensorConfigurationSensitivityLevel : public ReadAttribute { +class ReadBooleanSensorConfigurationCurrentSensitivityLevel : public ReadAttribute { public: - ReadBooleanSensorConfigurationSensitivityLevel() - : ReadAttribute("sensitivity-level") + ReadBooleanSensorConfigurationCurrentSensitivityLevel() + : ReadAttribute("current-sensitivity-level") { } - ~ReadBooleanSensorConfigurationSensitivityLevel() + ~ReadBooleanSensorConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.SensitivityLevel response %@", [value description]); + [cluster readAttributeCurrentSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.CurrentSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration SensitivityLevel read Error", error); + LogNSError("BooleanSensorConfiguration CurrentSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73427,24 +73485,24 @@ class ReadBooleanSensorConfigurationSensitivityLevel : public ReadAttribute { } }; -class WriteBooleanSensorConfigurationSensitivityLevel : public WriteAttribute { +class WriteBooleanSensorConfigurationCurrentSensitivityLevel : public WriteAttribute { public: - WriteBooleanSensorConfigurationSensitivityLevel() - : WriteAttribute("sensitivity-level") + WriteBooleanSensorConfigurationCurrentSensitivityLevel() + : WriteAttribute("current-sensitivity-level") { - AddArgument("attr-name", "sensitivity-level"); + AddArgument("attr-name", "current-sensitivity-level"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBooleanSensorConfigurationSensitivityLevel() + ~WriteBooleanSensorConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -73454,9 +73512,9 @@ class WriteBooleanSensorConfigurationSensitivityLevel : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeCurrentSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("BooleanSensorConfiguration SensitivityLevel write Error", error); + LogNSError("BooleanSensorConfiguration CurrentSensitivityLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73468,21 +73526,21 @@ class WriteBooleanSensorConfigurationSensitivityLevel : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeBooleanSensorConfigurationSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationSensitivityLevel() - : SubscribeAttribute("sensitivity-level") + SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel() + : SubscribeAttribute("current-sensitivity-level") { } - ~SubscribeAttributeBooleanSensorConfigurationSensitivityLevel() + ~SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::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); @@ -73497,10 +73555,180 @@ class SubscribeAttributeBooleanSensorConfigurationSensitivityLevel : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSensitivityLevelWithParams:params + [cluster subscribeAttributeCurrentSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.SensitivityLevel response %@", [value description]); + NSLog(@"BooleanSensorConfiguration.CurrentSensitivityLevel 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 SupportedSensitivityLevels + */ +class ReadBooleanSensorConfigurationSupportedSensitivityLevels : public ReadAttribute { +public: + ReadBooleanSensorConfigurationSupportedSensitivityLevels() + : ReadAttribute("supported-sensitivity-levels") + { + } + + ~ReadBooleanSensorConfigurationSupportedSensitivityLevels() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedSensitivityLevelsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.SupportedSensitivityLevels response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration SupportedSensitivityLevels read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels() + : SubscribeAttribute("supported-sensitivity-levels") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::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 = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeSupportedSensitivityLevelsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.SupportedSensitivityLevels 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 DefaultSensitivityLevel + */ +class ReadBooleanSensorConfigurationDefaultSensitivityLevel : public ReadAttribute { +public: + ReadBooleanSensorConfigurationDefaultSensitivityLevel() + : ReadAttribute("default-sensitivity-level") + { + } + + ~ReadBooleanSensorConfigurationDefaultSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.DefaultSensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration DefaultSensitivityLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel() + : SubscribeAttribute("default-sensitivity-level") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::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 = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeDefaultSensitivityLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.DefaultSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73723,62 +73951,191 @@ class ReadBooleanSensorConfigurationAlarmsEnabled : public ReadAttribute { } }; -class WriteBooleanSensorConfigurationAlarmsEnabled : public WriteAttribute { +class SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled : public SubscribeAttribute { public: - WriteBooleanSensorConfigurationAlarmsEnabled() - : WriteAttribute("alarms-enabled") + SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() + : SubscribeAttribute("alarms-enabled") { - AddArgument("attr-name", "alarms-enabled"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteBooleanSensorConfigurationAlarmsEnabled() + ~SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + 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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + __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 subscribeAttributeAlarmsEnabledWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeAlarmsEnabledWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BooleanSensorConfiguration AlarmsEnabled write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AlarmsSupported + */ +class ReadBooleanSensorConfigurationAlarmsSupported : public ReadAttribute { +public: + ReadBooleanSensorConfigurationAlarmsSupported() + : ReadAttribute("alarms-supported") + { + } + + ~ReadBooleanSensorConfigurationAlarmsSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSupported::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration AlarmsSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } +}; -private: - uint8_t mValue; +class SubscribeAttributeBooleanSensorConfigurationAlarmsSupported : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationAlarmsSupported() + : SubscribeAttribute("alarms-supported") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationAlarmsSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSupported::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 = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeAlarmsSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsSupported 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; + } }; -class SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SensorFault + */ +class ReadBooleanSensorConfigurationSensorFault : public ReadAttribute { public: - SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() - : SubscribeAttribute("alarms-enabled") + ReadBooleanSensorConfigurationSensorFault() + : ReadAttribute("sensor-fault") { } - ~SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() + ~ReadBooleanSensorConfigurationSensorFault() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensorFault::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSensorFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.SensorFault response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration SensorFault read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationSensorFault : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationSensorFault() + : SubscribeAttribute("sensor-fault") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationSensorFault() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensorFault::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); @@ -73793,10 +74150,10 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAlarmsEnabledWithParams:params + [cluster subscribeAttributeSensorFaultWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsEnabled response %@", [value description]); + NSLog(@"BooleanSensorConfiguration.SensorFault response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176285,15 +176642,26 @@ void registerClusterBooleanSensorConfiguration(Commands & commands) commands_list clusterCommands = { make_unique(Id), // #if MTR_ENABLE_PROVISIONAL - make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + 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(), // @@ -176305,9 +176673,16 @@ void registerClusterBooleanSensorConfiguration(Commands & commands) #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // - 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(), // From 72cd4a7eeb0dfe94d7fde1e6e3518de43e0e5071 Mon Sep 17 00:00:00 2001 From: Fesseha Date: Tue, 12 Dec 2023 16:21:54 +0100 Subject: [PATCH 2/9] rename to boolean state configuration cluster --- src/app/util/util.cpp | 2 +- ...on-cluster.xml => boolean-state-configuration-cluster.xml} | 4 ++-- src/app/zap-templates/zcl/zcl-with-test-extensions.json | 2 +- src/app/zap-templates/zcl/zcl.json | 2 +- src/app/zap_cluster_list.json | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/app/zap-templates/zcl/data-model/chip/{boolean-sensor-configuration-cluster.xml => boolean-state-configuration-cluster.xml} (97%) diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 9d618dcc69e93c..8c4f088f118554 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -158,7 +158,7 @@ void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallba void MatterOperationalStatePluginServerInitCallback() {} void MatterRvcOperationalStatePluginServerInitCallback() {} void MatterDishwasherAlarmPluginServerInitCallback() {} -void MatterBooleanSensorConfigurationPluginServerInitCallback() {} +void MatterBooleanStateConfigurationPluginServerInitCallback() {} void MatterValveConfigurationAndControlPluginServerInitCallback() {} void MatterMicrowaveOvenModePluginServerInitCallback() {} // **************************************** diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml similarity index 97% rename from src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml rename to src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml index bb2ecf9046805d..922546ab94724a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml @@ -37,10 +37,10 @@ limitations under the License. - Boolean Sensor Configuration + Boolean State Configuration Measurement & Sensing 0x0080 - BOOLEAN_SENSOR_CONFIGURATION_CLUSTER + BOOLEAN_STATE_CONFIGURATION_CLUSTER true true This cluster is used to configure a boolean sensor. 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 1bab6d709d05df..d9c94a48410e2d 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -24,8 +24,8 @@ "barrier-control-cluster.xml", "basic-information-cluster.xml", "binding-cluster.xml", - "boolean-sensor-configuration-cluster.xml", "boolean-state-cluster.xml", + "boolean-state-configuration-cluster.xml", "actions-cluster.xml", "bridged-device-basic-information.xml", "chip-ota.xml", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 257222de56ad40..9b785ee9daabe8 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -23,8 +23,8 @@ "barrier-control-cluster.xml", "basic-information-cluster.xml", "binding-cluster.xml", - "boolean-sensor-configuration-cluster.xml", "boolean-state-cluster.xml", + "boolean-state-configuration-cluster.xml", "actions-cluster.xml", "bridged-device-basic-information.xml", "chip-ota.xml", diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index cdd92f9698b1e8..77b466541f1a54 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -15,8 +15,8 @@ "BASIC_INFORMATION_CLUSTER": [], "BINARY_INPUT_BASIC_CLUSTER": [], "BINDING_CLUSTER": [], - "BOOLEAN_SENSOR_CONFIGURATION_CLUSTER": [], "BOOLEAN_STATE_CLUSTER": [], + "BOOLEAN_STATE_CONFIGURATION_CLUSTER": [], "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [], "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], @@ -146,8 +146,8 @@ "BASIC_INFORMATION_CLUSTER": ["basic-information"], "BINARY_INPUT_BASIC_CLUSTER": [], "BINDING_CLUSTER": ["bindings"], - "BOOLEAN_SENSOR_CONFIGURATION_CLUSTER": [], "BOOLEAN_STATE_CLUSTER": [], + "BOOLEAN_STATE_CONFIGURATION_CLUSTER": [], "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [ "bridged-device-basic-information-server" ], From 6d9087b236d3984b241a91c7a4dbd316ddf97455 Mon Sep 17 00:00:00 2001 From: Fesseha Date: Tue, 12 Dec 2023 17:10:15 +0100 Subject: [PATCH 3/9] regen after rename to boolean state configuration --- .../data_model/controller-clusters.matter | 2 +- .../chip/devicecontroller/ChipClusters.java | 4 +- .../devicecontroller/ChipEventStructs.java | 20 +- .../devicecontroller/ClusterIDMapping.java | 6 +- .../devicecontroller/ClusterInfoMapping.java | 48 +- .../devicecontroller/ClusterReadMapping.java | 160 +++--- .../devicecontroller/ClusterWriteMapping.java | 20 +- ...gurationClusterAlarmsStateChangedEvent.kt} | 11 +- ...teConfigurationClusterSensorFaultEvent.kt} | 8 +- .../chip/devicecontroller/cluster/files.gni | 4 +- ...kt => BooleanStateConfigurationCluster.kt} | 4 +- ...gurationClusterAlarmsStateChangedEvent.kt} | 11 +- ...teConfigurationClusterSensorFaultEvent.kt} | 8 +- .../matter/devicecontroller/cluster/files.gni | 6 +- .../CHIPAttributeTLVValueDecoder.cpp | 4 +- .../java/zap-generated/CHIPClientCallbacks.h | 8 +- .../zap-generated/CHIPClustersWrite-JNI.cpp | 8 +- .../CHIPEventTLVValueDecoder.cpp | 18 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 56 +- .../python/chip/clusters/CHIPClusters.py | 8 +- .../python/chip/clusters/Objects.py | 2 +- .../MTRAttributeSpecifiedCheck.mm | 8 +- .../MTRAttributeTLVValueDecoder.mm | 8 +- .../CHIP/zap-generated/MTRBaseClusters.h | 30 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 100 ++-- .../CHIP/zap-generated/MTRClusterConstants.h | 44 +- .../CHIP/zap-generated/MTRClusters.h | 10 +- .../CHIP/zap-generated/MTRClusters.mm | 44 +- .../zap-generated/MTRCommandPayloadsObjc.h | 4 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 16 +- .../MTRCommandPayloads_Internal.h | 4 +- .../zap-generated/MTRCommandTimedCheck.mm | 8 +- .../zap-generated/MTREventTLVValueDecoder.mm | 12 +- .../CHIP/zap-generated/MTRStructsObjc.h | 4 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 8 +- .../zap-generated/attributes/Accessors.cpp | 89 ++- .../zap-generated/attributes/Accessors.h | 24 +- .../app-common/zap-generated/callback.h | 50 +- .../app-common/zap-generated/cluster-enums.h | 4 +- .../zap-generated/cluster-objects.cpp | 6 +- .../zap-generated/cluster-objects.h | 90 +-- .../app-common/zap-generated/ids/Attributes.h | 4 +- .../app-common/zap-generated/ids/Clusters.h | 4 +- .../app-common/zap-generated/ids/Commands.h | 4 +- .../app-common/zap-generated/ids/Events.h | 4 +- .../app-common/zap-generated/print-cluster.h | 10 +- .../zap-generated/cluster/Commands.h | 56 +- .../cluster/logging/DataModelLogger.cpp | 54 +- .../cluster/logging/DataModelLogger.h | 7 +- .../zap-generated/cluster/Commands.h | 536 +++++++++--------- 50 files changed, 823 insertions(+), 835 deletions(-) rename src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/{BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt => BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt} (86%) rename src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/{BooleanSensorConfigurationClusterSensorFaultEvent.kt => BooleanStateConfigurationClusterSensorFaultEvent.kt} (83%) rename src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/{BooleanSensorConfigurationCluster.kt => BooleanStateConfigurationCluster.kt} (99%) rename src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/{BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt => BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt} (86%) rename src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/{BooleanSensorConfigurationClusterSensorFaultEvent.kt => BooleanStateConfigurationClusterSensorFaultEvent.kt} (83%) diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index bcea2d56e79364..a314a5b9eef5bf 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3997,7 +3997,7 @@ cluster ActivatedCarbonFilterMonitoring = 114 { } /** This cluster is used to configure a boolean sensor. */ -provisional cluster BooleanSensorConfiguration = 128 { +provisional cluster BooleanStateConfiguration = 128 { revision 1; bitmap AlarmModeBitmap : bitmap8 { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index b340f0bf423e1b..222d4a5f7b6ba7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -27416,7 +27416,7 @@ public void onSuccess(byte[] tlv) { } } - public static class BooleanSensorConfigurationCluster extends BaseChipCluster { + public static class BooleanStateConfigurationCluster extends BaseChipCluster { public static final long CLUSTER_ID = 128L; private static final long CURRENT_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 0L; @@ -27434,7 +27434,7 @@ public static class BooleanSensorConfigurationCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public BooleanSensorConfigurationCluster(long devicePtr, int endpointId) { + public BooleanStateConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index bf4e3438eca5ab..d47c53d57d86cc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -2907,13 +2907,13 @@ public String toString() { return output.toString(); } } -public static class BooleanSensorConfigurationClusterAlarmsStateChangedEvent { +public static class BooleanStateConfigurationClusterAlarmsStateChangedEvent { public Integer alarmsActive; public Optional alarmsSuppressed; private static final long ALARMS_ACTIVE_ID = 0L; private static final long ALARMS_SUPPRESSED_ID = 1L; - public BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + public BooleanStateConfigurationClusterAlarmsStateChangedEvent( Integer alarmsActive, Optional alarmsSuppressed ) { @@ -2929,7 +2929,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static BooleanSensorConfigurationClusterAlarmsStateChangedEvent decodeTlv(BaseTLVType tlvValue) { + public static BooleanStateConfigurationClusterAlarmsStateChangedEvent decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -2948,7 +2948,7 @@ public static BooleanSensorConfigurationClusterAlarmsStateChangedEvent decodeTlv } } } - return new BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + return new BooleanStateConfigurationClusterAlarmsStateChangedEvent( alarmsActive, alarmsSuppressed ); @@ -2957,7 +2957,7 @@ public static BooleanSensorConfigurationClusterAlarmsStateChangedEvent decodeTlv @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("BooleanSensorConfigurationClusterAlarmsStateChangedEvent {\n"); + output.append("BooleanStateConfigurationClusterAlarmsStateChangedEvent {\n"); output.append("\talarmsActive: "); output.append(alarmsActive); output.append("\n"); @@ -2968,11 +2968,11 @@ public String toString() { return output.toString(); } } -public static class BooleanSensorConfigurationClusterSensorFaultEvent { +public static class BooleanStateConfigurationClusterSensorFaultEvent { public Integer sensorFault; private static final long SENSOR_FAULT_ID = 0L; - public BooleanSensorConfigurationClusterSensorFaultEvent( + public BooleanStateConfigurationClusterSensorFaultEvent( Integer sensorFault ) { this.sensorFault = sensorFault; @@ -2985,7 +2985,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static BooleanSensorConfigurationClusterSensorFaultEvent decodeTlv(BaseTLVType tlvValue) { + public static BooleanStateConfigurationClusterSensorFaultEvent decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -2998,7 +2998,7 @@ public static BooleanSensorConfigurationClusterSensorFaultEvent decodeTlv(BaseTL } } } - return new BooleanSensorConfigurationClusterSensorFaultEvent( + return new BooleanStateConfigurationClusterSensorFaultEvent( sensorFault ); } @@ -3006,7 +3006,7 @@ public static BooleanSensorConfigurationClusterSensorFaultEvent decodeTlv(BaseTL @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("BooleanSensorConfigurationClusterSensorFaultEvent {\n"); + output.append("BooleanStateConfigurationClusterSensorFaultEvent {\n"); output.append("\tsensorFault: "); output.append(sensorFault); output.append("\n"); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 837df6395de5c9..dcd325bd57a110 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -217,8 +217,8 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == ActivatedCarbonFilterMonitoring.ID) { return new ActivatedCarbonFilterMonitoring(); } - if (clusterId == BooleanSensorConfiguration.ID) { - return new BooleanSensorConfiguration(); + if (clusterId == BooleanStateConfiguration.ID) { + return new BooleanStateConfiguration(); } if (clusterId == ValveConfigurationAndControl.ID) { return new ValveConfigurationAndControl(); @@ -8768,7 +8768,7 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class BooleanSensorConfiguration implements BaseCluster { + public static class BooleanStateConfiguration implements BaseCluster { public static final long ID = 128L; public long getID() { return ID; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 32bae98faf8897..f3a36b5b696394 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -9672,7 +9672,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBooleanSensorConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9693,7 +9693,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBooleanSensorConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9714,7 +9714,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBooleanSensorConfigurationClusterEventListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterEventListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9735,7 +9735,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBooleanSensorConfigurationClusterAttributeListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateConfigurationClusterAttributeListAttributeCallback implements ChipClusters.BooleanStateConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -19483,9 +19483,9 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.ActivatedCarbonFilterMonitoringCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInfo); - ClusterInfo booleanSensorConfigurationClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.BooleanSensorConfigurationCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("booleanSensorConfiguration", booleanSensorConfigurationClusterInfo); + ClusterInfo booleanStateConfigurationClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.BooleanStateConfigurationCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("booleanStateConfiguration", booleanStateConfigurationClusterInfo); ClusterInfo valveConfigurationAndControlClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ValveConfigurationAndControlCluster(ptr, endpointId), new HashMap<>()); @@ -19746,7 +19746,7 @@ public void combineCommand(Map destination, Map> getCommandMap() { commandMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInteractionInfoMap); - Map booleanSensorConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); + Map booleanStateConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); - Map booleanSensorConfigurationsuppressAlarmCommandParams = new LinkedHashMap(); + Map booleanStateConfigurationsuppressAlarmCommandParams = new LinkedHashMap(); - CommandParameterInfo booleanSensorConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo = new CommandParameterInfo("alarmsToSuppress", Integer.class, Integer.class); - booleanSensorConfigurationsuppressAlarmCommandParams.put("alarmsToSuppress",booleanSensorConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo); - InteractionInfo booleanSensorConfigurationsuppressAlarmInteractionInfo = new InteractionInfo( + CommandParameterInfo booleanStateConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo = new CommandParameterInfo("alarmsToSuppress", Integer.class, Integer.class); + booleanStateConfigurationsuppressAlarmCommandParams.put("alarmsToSuppress",booleanStateConfigurationsuppressAlarmalarmsToSuppressCommandParameterInfo); + InteractionInfo booleanStateConfigurationsuppressAlarmInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster) + ((ChipClusters.BooleanStateConfigurationCluster) cluster) .suppressAlarm((DefaultClusterCallback) callback , (Integer) commandArguments.get("alarmsToSuppress") ); }, () -> new DelegatedDefaultClusterCallback(), - booleanSensorConfigurationsuppressAlarmCommandParams + booleanStateConfigurationsuppressAlarmCommandParams ); - booleanSensorConfigurationClusterInteractionInfoMap.put("suppressAlarm", booleanSensorConfigurationsuppressAlarmInteractionInfo); + booleanStateConfigurationClusterInteractionInfoMap.put("suppressAlarm", booleanStateConfigurationsuppressAlarmInteractionInfo); - Map booleanSensorConfigurationenableDisableAlarmCommandParams = new LinkedHashMap(); + Map booleanStateConfigurationenableDisableAlarmCommandParams = new LinkedHashMap(); - CommandParameterInfo booleanSensorConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo = new CommandParameterInfo("alarmsToEnableDisable", Integer.class, Integer.class); - booleanSensorConfigurationenableDisableAlarmCommandParams.put("alarmsToEnableDisable",booleanSensorConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo); - InteractionInfo booleanSensorConfigurationenableDisableAlarmInteractionInfo = new InteractionInfo( + CommandParameterInfo booleanStateConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo = new CommandParameterInfo("alarmsToEnableDisable", Integer.class, Integer.class); + booleanStateConfigurationenableDisableAlarmCommandParams.put("alarmsToEnableDisable",booleanStateConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo); + InteractionInfo booleanStateConfigurationenableDisableAlarmInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster) + ((ChipClusters.BooleanStateConfigurationCluster) cluster) .enableDisableAlarm((DefaultClusterCallback) callback , (Integer) commandArguments.get("alarmsToEnableDisable") ); }, () -> new DelegatedDefaultClusterCallback(), - booleanSensorConfigurationenableDisableAlarmCommandParams + booleanStateConfigurationenableDisableAlarmCommandParams ); - booleanSensorConfigurationClusterInteractionInfoMap.put("enableDisableAlarm", booleanSensorConfigurationenableDisableAlarmInteractionInfo); + booleanStateConfigurationClusterInteractionInfoMap.put("enableDisableAlarm", booleanStateConfigurationenableDisableAlarmInteractionInfo); - commandMap.put("booleanSensorConfiguration", booleanSensorConfigurationClusterInteractionInfoMap); + commandMap.put("booleanStateConfiguration", booleanStateConfigurationClusterInteractionInfoMap); Map valveConfigurationAndControlClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index ef04c6547bab99..70985bfaa195a0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -8637,161 +8637,161 @@ private static Map readActivatedCarbonFilterMonitoringI return result; } - private static Map readBooleanSensorConfigurationInteractionInfo() { - Map result = new LinkedHashMap<>();Map readBooleanSensorConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + private static Map readBooleanStateConfigurationInteractionInfo() { + Map result = new LinkedHashMap<>();Map readBooleanStateConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readCurrentSensitivityLevelAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readCurrentSensitivityLevelAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationCurrentSensitivityLevelCommandParams + readBooleanStateConfigurationCurrentSensitivityLevelCommandParams ); - result.put("readCurrentSensitivityLevelAttribute", readBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo); - Map readBooleanSensorConfigurationSupportedSensitivityLevelsCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationSupportedSensitivityLevelsAttributeInteractionInfo = new InteractionInfo( + result.put("readCurrentSensitivityLevelAttribute", readBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo); + Map readBooleanStateConfigurationSupportedSensitivityLevelsCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationSupportedSensitivityLevelsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readSupportedSensitivityLevelsAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readSupportedSensitivityLevelsAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationSupportedSensitivityLevelsCommandParams + readBooleanStateConfigurationSupportedSensitivityLevelsCommandParams ); - result.put("readSupportedSensitivityLevelsAttribute", readBooleanSensorConfigurationSupportedSensitivityLevelsAttributeInteractionInfo); - Map readBooleanSensorConfigurationDefaultSensitivityLevelCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationDefaultSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + result.put("readSupportedSensitivityLevelsAttribute", readBooleanStateConfigurationSupportedSensitivityLevelsAttributeInteractionInfo); + Map readBooleanStateConfigurationDefaultSensitivityLevelCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationDefaultSensitivityLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readDefaultSensitivityLevelAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readDefaultSensitivityLevelAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationDefaultSensitivityLevelCommandParams + readBooleanStateConfigurationDefaultSensitivityLevelCommandParams ); - result.put("readDefaultSensitivityLevelAttribute", readBooleanSensorConfigurationDefaultSensitivityLevelAttributeInteractionInfo); - Map readBooleanSensorConfigurationAlarmsActiveCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationAlarmsActiveAttributeInteractionInfo = new InteractionInfo( + result.put("readDefaultSensitivityLevelAttribute", readBooleanStateConfigurationDefaultSensitivityLevelAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsActiveCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsActiveAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsActiveAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsActiveAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationAlarmsActiveCommandParams + readBooleanStateConfigurationAlarmsActiveCommandParams ); - result.put("readAlarmsActiveAttribute", readBooleanSensorConfigurationAlarmsActiveAttributeInteractionInfo); - Map readBooleanSensorConfigurationAlarmsSuppressedCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationAlarmsSuppressedAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsActiveAttribute", readBooleanStateConfigurationAlarmsActiveAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsSuppressedCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsSuppressedAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsSuppressedAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsSuppressedAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationAlarmsSuppressedCommandParams + readBooleanStateConfigurationAlarmsSuppressedCommandParams ); - result.put("readAlarmsSuppressedAttribute", readBooleanSensorConfigurationAlarmsSuppressedAttributeInteractionInfo); - Map readBooleanSensorConfigurationAlarmsEnabledCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsSuppressedAttribute", readBooleanStateConfigurationAlarmsSuppressedAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsEnabledAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsEnabledAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationAlarmsEnabledCommandParams + readBooleanStateConfigurationAlarmsEnabledCommandParams ); - result.put("readAlarmsEnabledAttribute", readBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo); - Map readBooleanSensorConfigurationAlarmsSupportedCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationAlarmsSupportedAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsEnabledAttribute", readBooleanStateConfigurationAlarmsEnabledAttributeInteractionInfo); + Map readBooleanStateConfigurationAlarmsSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAlarmsSupportedAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsSupportedAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsSupportedAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationAlarmsSupportedCommandParams + readBooleanStateConfigurationAlarmsSupportedCommandParams ); - result.put("readAlarmsSupportedAttribute", readBooleanSensorConfigurationAlarmsSupportedAttributeInteractionInfo); - Map readBooleanSensorConfigurationSensorFaultCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationSensorFaultAttributeInteractionInfo = new InteractionInfo( + result.put("readAlarmsSupportedAttribute", readBooleanStateConfigurationAlarmsSupportedAttributeInteractionInfo); + Map readBooleanStateConfigurationSensorFaultCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationSensorFaultAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readSensorFaultAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readSensorFaultAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationSensorFaultCommandParams + readBooleanStateConfigurationSensorFaultCommandParams ); - result.put("readSensorFaultAttribute", readBooleanSensorConfigurationSensorFaultAttributeInteractionInfo); - Map readBooleanSensorConfigurationGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readSensorFaultAttribute", readBooleanStateConfigurationSensorFaultAttributeInteractionInfo); + Map readBooleanStateConfigurationGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.BooleanSensorConfigurationCluster.GeneratedCommandListAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.GeneratedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterGeneratedCommandListAttributeCallback(), - readBooleanSensorConfigurationGeneratedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterGeneratedCommandListAttributeCallback(), + readBooleanStateConfigurationGeneratedCommandListCommandParams ); - result.put("readGeneratedCommandListAttribute", readBooleanSensorConfigurationGeneratedCommandListAttributeInteractionInfo); - Map readBooleanSensorConfigurationAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readGeneratedCommandListAttribute", readBooleanStateConfigurationGeneratedCommandListAttributeInteractionInfo); + Map readBooleanStateConfigurationAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.BooleanSensorConfigurationCluster.AcceptedCommandListAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.AcceptedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterAcceptedCommandListAttributeCallback(), - readBooleanSensorConfigurationAcceptedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterAcceptedCommandListAttributeCallback(), + readBooleanStateConfigurationAcceptedCommandListCommandParams ); - result.put("readAcceptedCommandListAttribute", readBooleanSensorConfigurationAcceptedCommandListAttributeInteractionInfo); - Map readBooleanSensorConfigurationEventListCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationEventListAttributeInteractionInfo = new InteractionInfo( + result.put("readAcceptedCommandListAttribute", readBooleanStateConfigurationAcceptedCommandListAttributeInteractionInfo); + Map readBooleanStateConfigurationEventListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationEventListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readEventListAttribute( - (ChipClusters.BooleanSensorConfigurationCluster.EventListAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readEventListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.EventListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterEventListAttributeCallback(), - readBooleanSensorConfigurationEventListCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterEventListAttributeCallback(), + readBooleanStateConfigurationEventListCommandParams ); - result.put("readEventListAttribute", readBooleanSensorConfigurationEventListAttributeInteractionInfo); - Map readBooleanSensorConfigurationAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationAttributeListAttributeInteractionInfo = new InteractionInfo( + result.put("readEventListAttribute", readBooleanStateConfigurationEventListAttributeInteractionInfo); + Map readBooleanStateConfigurationAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationAttributeListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAttributeListAttribute( - (ChipClusters.BooleanSensorConfigurationCluster.AttributeListAttributeCallback) callback + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAttributeListAttribute( + (ChipClusters.BooleanStateConfigurationCluster.AttributeListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterAttributeListAttributeCallback(), - readBooleanSensorConfigurationAttributeListCommandParams + () -> new ClusterInfoMapping.DelegatedBooleanStateConfigurationClusterAttributeListAttributeCallback(), + readBooleanStateConfigurationAttributeListCommandParams ); - result.put("readAttributeListAttribute", readBooleanSensorConfigurationAttributeListAttributeInteractionInfo); - Map readBooleanSensorConfigurationFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationFeatureMapAttributeInteractionInfo = new InteractionInfo( + result.put("readAttributeListAttribute", readBooleanStateConfigurationAttributeListAttributeInteractionInfo); + Map readBooleanStateConfigurationFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationFeatureMapAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readFeatureMapAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readFeatureMapAttribute( (ChipClusters.LongAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readBooleanSensorConfigurationFeatureMapCommandParams + readBooleanStateConfigurationFeatureMapCommandParams ); - result.put("readFeatureMapAttribute", readBooleanSensorConfigurationFeatureMapAttributeInteractionInfo); - Map readBooleanSensorConfigurationClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readBooleanSensorConfigurationClusterRevisionAttributeInteractionInfo = new InteractionInfo( + result.put("readFeatureMapAttribute", readBooleanStateConfigurationFeatureMapAttributeInteractionInfo); + Map readBooleanStateConfigurationClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanStateConfigurationClusterRevisionAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readClusterRevisionAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).readClusterRevisionAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBooleanSensorConfigurationClusterRevisionCommandParams + readBooleanStateConfigurationClusterRevisionCommandParams ); - result.put("readClusterRevisionAttribute", readBooleanSensorConfigurationClusterRevisionAttributeInteractionInfo); + result.put("readClusterRevisionAttribute", readBooleanStateConfigurationClusterRevisionAttributeInteractionInfo); return result; } @@ -19504,7 +19504,7 @@ public Map> getReadAttributeMap() { put("rvcOperationalState", readRvcOperationalStateInteractionInfo()); put("hepaFilterMonitoring", readHepaFilterMonitoringInteractionInfo()); put("activatedCarbonFilterMonitoring", readActivatedCarbonFilterMonitoringInteractionInfo()); - put("booleanSensorConfiguration", readBooleanSensorConfigurationInteractionInfo()); + put("booleanStateConfiguration", readBooleanStateConfigurationInteractionInfo()); put("valveConfigurationAndControl", readValveConfigurationAndControlInteractionInfo()); put("electricalEnergyMeasurement", readElectricalEnergyMeasurementInteractionInfo()); put("demandResponseLoadControl", readDemandResponseLoadControlInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index a668cab94e0add..3db35dfd2b3970 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -1164,30 +1164,30 @@ public Map> getWriteAttributeMap() { ); writeActivatedCarbonFilterMonitoringInteractionInfo.put("writeLastChangedTimeAttribute", writeActivatedCarbonFilterMonitoringLastChangedTimeAttributeInteractionInfo); writeAttributeMap.put("activatedCarbonFilterMonitoring", writeActivatedCarbonFilterMonitoringInteractionInfo); - Map writeBooleanSensorConfigurationInteractionInfo = new LinkedHashMap<>(); - Map writeBooleanSensorConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); - CommandParameterInfo booleanSensorConfigurationcurrentSensitivityLevelCommandParameterInfo = + Map writeBooleanStateConfigurationInteractionInfo = new LinkedHashMap<>(); + Map writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo booleanStateConfigurationcurrentSensitivityLevelCommandParameterInfo = new CommandParameterInfo( "value", Integer.class, Integer.class ); - writeBooleanSensorConfigurationCurrentSensitivityLevelCommandParams.put( + writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams.put( "value", - booleanSensorConfigurationcurrentSensitivityLevelCommandParameterInfo + booleanStateConfigurationcurrentSensitivityLevelCommandParameterInfo ); - InteractionInfo writeBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.BooleanSensorConfigurationCluster) cluster).writeCurrentSensitivityLevelAttribute( + ((ChipClusters.BooleanStateConfigurationCluster) cluster).writeCurrentSensitivityLevelAttribute( (DefaultClusterCallback) callback, (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBooleanSensorConfigurationCurrentSensitivityLevelCommandParams + writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams ); - writeBooleanSensorConfigurationInteractionInfo.put("writeCurrentSensitivityLevelAttribute", writeBooleanSensorConfigurationCurrentSensitivityLevelAttributeInteractionInfo); - writeAttributeMap.put("booleanSensorConfiguration", writeBooleanSensorConfigurationInteractionInfo); + writeBooleanStateConfigurationInteractionInfo.put("writeCurrentSensitivityLevelAttribute", writeBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo); + writeAttributeMap.put("booleanStateConfiguration", writeBooleanStateConfigurationInteractionInfo); Map writeValveConfigurationAndControlInteractionInfo = new LinkedHashMap<>(); Map writeValveConfigurationAndControlOpenDurationCommandParams = new LinkedHashMap(); CommandParameterInfo valveConfigurationAndControlopenDurationCommandParameterInfo = diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt similarity index 86% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt index c51a8e06724875..4c7e0fd2bb6110 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt @@ -23,12 +23,12 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( +class BooleanStateConfigurationClusterAlarmsStateChangedEvent( val alarmsActive: UInt, val alarmsSuppressed: Optional ) { override fun toString(): String = buildString { - append("BooleanSensorConfigurationClusterAlarmsStateChangedEvent {\n") + append("BooleanStateConfigurationClusterAlarmsStateChangedEvent {\n") append("\talarmsActive : $alarmsActive\n") append("\talarmsSuppressed : $alarmsSuppressed\n") append("}\n") @@ -53,7 +53,7 @@ class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( fun fromTlv( tlvTag: Tag, tlvReader: TlvReader - ): BooleanSensorConfigurationClusterAlarmsStateChangedEvent { + ): BooleanStateConfigurationClusterAlarmsStateChangedEvent { tlvReader.enterStructure(tlvTag) val alarmsActive = tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_ACTIVE)) val alarmsSuppressed = @@ -65,10 +65,7 @@ class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( tlvReader.exitContainer() - return BooleanSensorConfigurationClusterAlarmsStateChangedEvent( - alarmsActive, - alarmsSuppressed - ) + return BooleanStateConfigurationClusterAlarmsStateChangedEvent(alarmsActive, alarmsSuppressed) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt similarity index 83% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt index dd9fa9e59bfbe6..6232f56300e520 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt @@ -22,9 +22,9 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanSensorConfigurationClusterSensorFaultEvent(val sensorFault: UInt) { +class BooleanStateConfigurationClusterSensorFaultEvent(val sensorFault: UInt) { override fun toString(): String = buildString { - append("BooleanSensorConfigurationClusterSensorFaultEvent {\n") + append("BooleanStateConfigurationClusterSensorFaultEvent {\n") append("\tsensorFault : $sensorFault\n") append("}\n") } @@ -43,13 +43,13 @@ class BooleanSensorConfigurationClusterSensorFaultEvent(val sensorFault: UInt) { fun fromTlv( tlvTag: Tag, tlvReader: TlvReader - ): BooleanSensorConfigurationClusterSensorFaultEvent { + ): BooleanStateConfigurationClusterSensorFaultEvent { tlvReader.enterStructure(tlvTag) val sensorFault = tlvReader.getUInt(ContextSpecificTag(TAG_SENSOR_FAULT)) tlvReader.exitContainer() - return BooleanSensorConfigurationClusterSensorFaultEvent(sensorFault) + return BooleanStateConfigurationClusterSensorFaultEvent(sensorFault) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 46c8fb14c98d86..84215b85a40fb6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -131,9 +131,9 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt", diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateConfigurationCluster.kt similarity index 99% rename from src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt rename to src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateConfigurationCluster.kt index 876fb2182b745b..01a992f9bef496 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateConfigurationCluster.kt @@ -29,7 +29,7 @@ import matter.tlv.ContextSpecificTag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanSensorConfigurationCluster( +class BooleanStateConfigurationCluster( private val controller: MatterController, private val endpointId: UShort ) { @@ -635,7 +635,7 @@ class BooleanSensorConfigurationCluster( } companion object { - private val logger = Logger.getLogger(BooleanSensorConfigurationCluster::class.java.name) + private val logger = Logger.getLogger(BooleanStateConfigurationCluster::class.java.name) const val CLUSTER_ID: UInt = 128u } } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt similarity index 86% rename from src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt rename to src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt index f5e2a6707832e7..cd948df453a998 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt @@ -23,12 +23,12 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( +class BooleanStateConfigurationClusterAlarmsStateChangedEvent( val alarmsActive: UByte, val alarmsSuppressed: Optional ) { override fun toString(): String = buildString { - append("BooleanSensorConfigurationClusterAlarmsStateChangedEvent {\n") + append("BooleanStateConfigurationClusterAlarmsStateChangedEvent {\n") append("\talarmsActive : $alarmsActive\n") append("\talarmsSuppressed : $alarmsSuppressed\n") append("}\n") @@ -53,7 +53,7 @@ class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( fun fromTlv( tlvTag: Tag, tlvReader: TlvReader - ): BooleanSensorConfigurationClusterAlarmsStateChangedEvent { + ): BooleanStateConfigurationClusterAlarmsStateChangedEvent { tlvReader.enterStructure(tlvTag) val alarmsActive = tlvReader.getUByte(ContextSpecificTag(TAG_ALARMS_ACTIVE)) val alarmsSuppressed = @@ -65,10 +65,7 @@ class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( tlvReader.exitContainer() - return BooleanSensorConfigurationClusterAlarmsStateChangedEvent( - alarmsActive, - alarmsSuppressed - ) + return BooleanStateConfigurationClusterAlarmsStateChangedEvent(alarmsActive, alarmsSuppressed) } } } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt similarity index 83% rename from src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt rename to src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt index 0be2a8b6c483d9..9c4829b8f5d15a 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt @@ -22,9 +22,9 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanSensorConfigurationClusterSensorFaultEvent(val sensorFault: UShort) { +class BooleanStateConfigurationClusterSensorFaultEvent(val sensorFault: UShort) { override fun toString(): String = buildString { - append("BooleanSensorConfigurationClusterSensorFaultEvent {\n") + append("BooleanStateConfigurationClusterSensorFaultEvent {\n") append("\tsensorFault : $sensorFault\n") append("}\n") } @@ -43,13 +43,13 @@ class BooleanSensorConfigurationClusterSensorFaultEvent(val sensorFault: UShort) fun fromTlv( tlvTag: Tag, tlvReader: TlvReader - ): BooleanSensorConfigurationClusterSensorFaultEvent { + ): BooleanStateConfigurationClusterSensorFaultEvent { tlvReader.enterStructure(tlvTag) val sensorFault = tlvReader.getUShort(ContextSpecificTag(TAG_SENSOR_FAULT)) tlvReader.exitContainer() - return BooleanSensorConfigurationClusterSensorFaultEvent(sensorFault) + return BooleanStateConfigurationClusterSensorFaultEvent(sensorFault) } } } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni index fac796ccfe5133..e74884e272630e 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni @@ -131,9 +131,9 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", - "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt", - "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterSensorFaultEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt", @@ -212,8 +212,8 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BinaryInputBasicCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BindingCluster.kt", - "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateConfigurationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt", diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 2e3d80723d9657..5e93c001c889d5 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -18781,8 +18781,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::BooleanSensorConfiguration::Id: { - using namespace app::Clusters::BooleanSensorConfiguration; + case app::Clusters::BooleanStateConfiguration::Id: { + using namespace app::Clusters::BooleanStateConfiguration; switch (aPath.mAttributeId) { case Attributes::CurrentSensitivityLevel::Id: { diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index fdc34c7fee5595..4ba2a2d93b7451 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -713,13 +713,13 @@ typedef void (*ActivatedCarbonFilterMonitoringEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ActivatedCarbonFilterMonitoringAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanSensorConfigurationGeneratedCommandListListAttributeCallback)( +typedef void (*BooleanStateConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanSensorConfigurationAcceptedCommandListListAttributeCallback)( +typedef void (*BooleanStateConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanSensorConfigurationEventListListAttributeCallback)( +typedef void (*BooleanStateConfigurationEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*BooleanSensorConfigurationAttributeListListAttributeCallback)( +typedef void (*BooleanStateConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ValveConfigurationAndControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index c7002477c201ef..d5b8cec9d91b2f 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -3288,12 +3288,12 @@ JNI_METHOD(void, ActivatedCarbonFilterMonitoringCluster, writeLastChangedTimeAtt onFailure.release(); } -JNI_METHOD(void, BooleanSensorConfigurationCluster, writeCurrentSensitivityLevelAttribute) +JNI_METHOD(void, BooleanStateConfigurationCluster, writeCurrentSensitivityLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; @@ -3314,8 +3314,8 @@ JNI_METHOD(void, BooleanSensorConfigurationCluster, writeCurrentSensitivityLevel chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - BooleanSensorConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + BooleanStateConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 9b06d341084e04..dd617361c8a04a 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -3663,8 +3663,8 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::BooleanSensorConfiguration::Id: { - using namespace app::Clusters::BooleanSensorConfiguration; + case app::Clusters::BooleanStateConfiguration::Id: { + using namespace app::Clusters::BooleanStateConfiguration; switch (aPath.mEventId) { case Events::AlarmsStateChanged::Id: { @@ -3702,19 +3702,19 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jclass alarmsStateChangedStructClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipEventStructs$BooleanSensorConfigurationClusterAlarmsStateChangedEvent", + env, "chip/devicecontroller/ChipEventStructs$BooleanStateConfigurationClusterAlarmsStateChangedEvent", alarmsStateChangedStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanSensorConfigurationClusterAlarmsStateChangedEvent"); + ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanStateConfigurationClusterAlarmsStateChangedEvent"); return nullptr; } jmethodID alarmsStateChangedStructCtor = env->GetMethodID(alarmsStateChangedStructClass, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); if (alarmsStateChangedStructCtor == nullptr) { - ChipLogError( - Zcl, "Could not find ChipEventStructs$BooleanSensorConfigurationClusterAlarmsStateChangedEvent constructor"); + ChipLogError(Zcl, + "Could not find ChipEventStructs$BooleanStateConfigurationClusterAlarmsStateChangedEvent constructor"); return nullptr; } @@ -3740,17 +3740,17 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jclass sensorFaultStructClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent", + env, "chip/devicecontroller/ChipEventStructs$BooleanStateConfigurationClusterSensorFaultEvent", sensorFaultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent"); + ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanStateConfigurationClusterSensorFaultEvent"); return nullptr; } jmethodID sensorFaultStructCtor = env->GetMethodID(sensorFaultStructClass, "", "(Ljava/lang/Integer;)V"); if (sensorFaultStructCtor == nullptr) { - ChipLogError(Zcl, "Could not find ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent constructor"); + ChipLogError(Zcl, "Could not find ChipEventStructs$BooleanStateConfigurationClusterSensorFaultEvent constructor"); return nullptr; } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 630984be29b0a7..81b68d84786986 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -29723,9 +29723,9 @@ void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback:: -CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback:: +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29742,8 +29742,8 @@ CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback(jobject java } } -CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback::~ -CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback() +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback::~ +CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29754,7 +29754,7 @@ CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanStateConfigurationGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29764,8 +29764,8 @@ void CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29796,9 +29796,9 @@ void CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback:: -CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback:: +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29815,8 +29815,8 @@ CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback(jobject javaC } } -CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback::~ -CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback() +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback::~ +CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29827,7 +29827,7 @@ CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanStateConfigurationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29837,8 +29837,8 @@ void CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29869,9 +29869,9 @@ void CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanSensorConfigurationEventListAttributeCallback::CHIPBooleanSensorConfigurationEventListAttributeCallback( +CHIPBooleanStateConfigurationEventListAttributeCallback::CHIPBooleanStateConfigurationEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29888,7 +29888,7 @@ CHIPBooleanSensorConfigurationEventListAttributeCallback::CHIPBooleanSensorConfi } } -CHIPBooleanSensorConfigurationEventListAttributeCallback::~CHIPBooleanSensorConfigurationEventListAttributeCallback() +CHIPBooleanStateConfigurationEventListAttributeCallback::~CHIPBooleanStateConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29899,7 +29899,7 @@ CHIPBooleanSensorConfigurationEventListAttributeCallback::~CHIPBooleanSensorConf env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanSensorConfigurationEventListAttributeCallback::CallbackFn( +void CHIPBooleanStateConfigurationEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29909,8 +29909,8 @@ void CHIPBooleanSensorConfigurationEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -29941,9 +29941,9 @@ void CHIPBooleanSensorConfigurationEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanSensorConfigurationAttributeListAttributeCallback::CHIPBooleanSensorConfigurationAttributeListAttributeCallback( +CHIPBooleanStateConfigurationAttributeListAttributeCallback::CHIPBooleanStateConfigurationAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29960,7 +29960,7 @@ CHIPBooleanSensorConfigurationAttributeListAttributeCallback::CHIPBooleanSensorC } } -CHIPBooleanSensorConfigurationAttributeListAttributeCallback::~CHIPBooleanSensorConfigurationAttributeListAttributeCallback() +CHIPBooleanStateConfigurationAttributeListAttributeCallback::~CHIPBooleanStateConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29971,7 +29971,7 @@ CHIPBooleanSensorConfigurationAttributeListAttributeCallback::~CHIPBooleanSensor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanSensorConfigurationAttributeListAttributeCallback::CallbackFn( +void CHIPBooleanStateConfigurationAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29981,8 +29981,8 @@ void CHIPBooleanSensorConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 7c6f4df54ba170..08ff2ab1b8d93a 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -6135,8 +6135,8 @@ class ChipClusters: }, }, } - _BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_INFO = { - "clusterName": "BooleanSensorConfiguration", + _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO = { + "clusterName": "BooleanStateConfiguration", "clusterId": 0x00000080, "commands": { 0x00000000: { @@ -13866,7 +13866,7 @@ class ChipClusters: 0x00000061: _RVC_OPERATIONAL_STATE_CLUSTER_INFO, 0x00000071: _HEPA_FILTER_MONITORING_CLUSTER_INFO, 0x00000072: _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, - 0x00000080: _BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_INFO, + 0x00000080: _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO, 0x00000081: _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, 0x00000091: _ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_INFO, 0x00000096: _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO, @@ -13981,7 +13981,7 @@ class ChipClusters: "RvcOperationalState": _RVC_OPERATIONAL_STATE_CLUSTER_INFO, "HepaFilterMonitoring": _HEPA_FILTER_MONITORING_CLUSTER_INFO, "ActivatedCarbonFilterMonitoring": _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, - "BooleanSensorConfiguration": _BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_INFO, + "BooleanStateConfiguration": _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO, "ValveConfigurationAndControl": _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, "ElectricalEnergyMeasurement": _ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_INFO, "DemandResponseLoadControl": _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index f865f566a56627..3ce470382a5529 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -21483,7 +21483,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class BooleanSensorConfiguration(Cluster): +class BooleanStateConfiguration(Cluster): id: typing.ClassVar[int] = 0x00000080 @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 16f802fdca5290..d579533e2eb296 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -2819,9 +2819,9 @@ static BOOL AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(Attribu } } } -static BOOL AttributeIsSpecifiedInBooleanSensorConfigurationCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInBooleanStateConfigurationCluster(AttributeId aAttributeId) { - using namespace Clusters::BooleanSensorConfiguration; + using namespace Clusters::BooleanStateConfiguration; switch (aAttributeId) { case Attributes::CurrentSensitivityLevel::Id: { return YES; @@ -6354,8 +6354,8 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ActivatedCarbonFilterMonitoring::Id: { return AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(aAttributeId); } - case Clusters::BooleanSensorConfiguration::Id: { - return AttributeIsSpecifiedInBooleanSensorConfigurationCluster(aAttributeId); + case Clusters::BooleanStateConfiguration::Id: { + return AttributeIsSpecifiedInBooleanStateConfigurationCluster(aAttributeId); } case Clusters::ValveConfigurationAndControl::Id: { return AttributeIsSpecifiedInValveConfigurationAndControlCluster(aAttributeId); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 54ccf48c5fad48..284fd77d838cb4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -7381,9 +7381,9 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForBooleanSensorConfigurationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForBooleanStateConfigurationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::BooleanSensorConfiguration; + using namespace Clusters::BooleanStateConfiguration; switch (aAttributeId) { case Attributes::CurrentSensitivityLevel::Id: { using TypeInfo = Attributes::CurrentSensitivityLevel::TypeInfo; @@ -17936,8 +17936,8 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ActivatedCarbonFilterMonitoring::Id: { return DecodeAttributeValueForActivatedCarbonFilterMonitoringCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::BooleanSensorConfiguration::Id: { - return DecodeAttributeValueForBooleanSensorConfigurationCluster(aPath.mAttributeId, aReader, aError); + case Clusters::BooleanStateConfiguration::Id: { + return DecodeAttributeValueForBooleanStateConfigurationCluster(aPath.mAttributeId, aReader, aError); } case Clusters::ValveConfigurationAndControl::Id: { return DecodeAttributeValueForValveConfigurationAndControlCluster(aPath.mAttributeId, aReader, aError); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index cf6c684ef10fa5..ac1bb59824203b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -6985,25 +6985,25 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Boolean Sensor Configuration + * Cluster Boolean State Configuration * * This cluster is used to configure a boolean sensor. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRBaseClusterBooleanSensorConfiguration : MTRGenericBaseCluster +@interface MTRBaseClusterBooleanStateConfiguration : MTRGenericBaseCluster /** * Command SuppressAlarm * * This command is used to suppress the specified alarm mode. */ -- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; /** * Command EnableDisableAlarm * * This command is used to enable or disable the specified alarm mode. */ -- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; @@ -7096,7 +7096,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRBaseClusterBooleanSensorConfiguration (Availability) +@interface MTRBaseClusterBooleanStateConfiguration (Availability) /** * For all instance methods (reads, writes, commands) that take a completion, @@ -16839,20 +16839,20 @@ typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTRBooleanSensorConfigurationAlarmModeBitmap) { - MTRBooleanSensorConfigurationAlarmModeBitmapVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRBooleanSensorConfigurationAlarmModeBitmapAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, +typedef NS_OPTIONS(uint8_t, MTRBooleanStateConfigurationAlarmModeBitmap) { + MTRBooleanStateConfigurationAlarmModeBitmapVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBooleanStateConfigurationAlarmModeBitmapAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRBooleanSensorConfigurationFeature) { - MTRBooleanSensorConfigurationFeatureVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRBooleanSensorConfigurationFeatureAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRBooleanSensorConfigurationFeatureAlarmSuppress MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRBooleanSensorConfigurationFeatureSensitivityLevel MTR_PROVISIONALLY_AVAILABLE = 0x8, +typedef NS_OPTIONS(uint32_t, MTRBooleanStateConfigurationFeature) { + MTRBooleanStateConfigurationFeatureVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBooleanStateConfigurationFeatureAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRBooleanStateConfigurationFeatureAlarmSuppress MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRBooleanStateConfigurationFeatureSensitivityLevel MTR_PROVISIONALLY_AVAILABLE = 0x8, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint16_t, MTRBooleanSensorConfigurationSensorFaultBitmap) { - MTRBooleanSensorConfigurationSensorFaultBitmapGneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, +typedef NS_OPTIONS(uint16_t, MTRBooleanStateConfigurationSensorFaultBitmap) { + MTRBooleanStateConfigurationSensorFaultBitmapGneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlValveState) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 07034e77f683ae..a302e645ffec6a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -49082,12 +49082,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterBooleanSensorConfiguration +@implementation MTRBaseClusterBooleanStateConfiguration -- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams + params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; } @@ -49097,7 +49097,7 @@ - (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BooleanSensorConfiguration::Commands::SuppressAlarm::Type; + using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -49108,10 +49108,10 @@ - (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAla queue:self.callbackQueue completion:responseHandler]; } -- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams + params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; } @@ -49121,7 +49121,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnable auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type; + using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -49135,7 +49135,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnable - (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49163,7 +49163,7 @@ - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)valu } ListFreer listFreer; - using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; @@ -49176,7 +49176,7 @@ - (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49188,7 +49188,7 @@ - (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams + (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49199,7 +49199,7 @@ + (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterSta - (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49212,7 +49212,7 @@ - (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribePara subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49224,7 +49224,7 @@ - (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribePara + (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49235,7 +49235,7 @@ + (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRCluster - (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49248,7 +49248,7 @@ - (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49260,7 +49260,7 @@ - (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams + (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49271,7 +49271,7 @@ + (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterSta - (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsActive::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49284,7 +49284,7 @@ - (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsActive::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49296,7 +49296,7 @@ - (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull) + (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsActive::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49307,7 +49307,7 @@ + (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49320,7 +49320,7 @@ - (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49332,7 +49332,7 @@ - (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonn + (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49343,7 +49343,7 @@ + (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49356,7 +49356,7 @@ - (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49368,7 +49368,7 @@ - (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49379,7 +49379,7 @@ + (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49392,7 +49392,7 @@ - (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49404,7 +49404,7 @@ - (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSupported::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49415,7 +49415,7 @@ + (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::SensorFault::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49428,7 +49428,7 @@ - (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::SensorFault::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49440,7 +49440,7 @@ - (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::SensorFault::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49451,7 +49451,7 @@ + (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49464,7 +49464,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49476,7 +49476,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49487,7 +49487,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49500,7 +49500,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49512,7 +49512,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49523,7 +49523,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49536,7 +49536,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49548,7 +49548,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49559,7 +49559,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49572,7 +49572,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49584,7 +49584,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49595,7 +49595,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49608,7 +49608,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49620,7 +49620,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49631,7 +49631,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49644,7 +49644,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanSensorConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49656,7 +49656,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanSensorConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index a93a6981e2eee9..992f2f1db68c32 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -148,7 +148,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeRVCOperationalStateID MTR_NEWLY_AVAILABLE = 0x00000061, MTRClusterIDTypeHEPAFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000071, MTRClusterIDTypeActivatedCarbonFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000072, - MTRClusterIDTypeBooleanSensorConfigurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, + MTRClusterIDTypeBooleanStateConfigurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, MTRClusterIDTypeValveConfigurationAndControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000081, MTRClusterIDTypeElectricalEnergyMeasurementID MTR_PROVISIONALLY_AVAILABLE = 0x00000091, MTRClusterIDTypeDemandResponseLoadControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000096, @@ -2576,21 +2576,21 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster BooleanSensorConfiguration attributes - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeCurrentSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSupportedSensitivityLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeDefaultSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsActiveID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSuppressedID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster BooleanStateConfiguration attributes + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSupportedSensitivityLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeDefaultSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsActiveID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSuppressedID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster ValveConfigurationAndControl attributes MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6250,9 +6250,9 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster ActivatedCarbonFilterMonitoring commands MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - // Cluster BooleanSensorConfiguration commands - MTRCommandIDTypeClusterBooleanSensorConfigurationCommandSuppressAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterBooleanSensorConfigurationCommandEnableDisableAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster BooleanStateConfiguration commands + MTRCommandIDTypeClusterBooleanStateConfigurationCommandSuppressAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterBooleanStateConfigurationCommandEnableDisableAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster ValveConfigurationAndControl commands MTRCommandIDTypeClusterValveConfigurationAndControlCommandOpenID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -7149,9 +7149,9 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterRVCOperationalStateEventOperationalErrorID MTR_NEWLY_AVAILABLE = 0x00000000, MTREventIDTypeClusterRVCOperationalStateEventOperationCompletionID MTR_NEWLY_AVAILABLE = 0x00000001, - // Cluster BooleanSensorConfiguration events - MTREventIDTypeClusterBooleanSensorConfigurationEventAlarmsStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTREventIDTypeClusterBooleanSensorConfigurationEventSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster BooleanStateConfiguration events + MTREventIDTypeClusterBooleanStateConfigurationEventAlarmsStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterBooleanStateConfigurationEventSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, // Cluster ValveConfigurationAndControl events MTREventIDTypeClusterValveConfigurationAndControlEventValveStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 2354c9e855e76e..03bf5243d06402 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3311,14 +3311,14 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Boolean Sensor Configuration + * Cluster Boolean State Configuration * This cluster is used to configure a boolean sensor. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRClusterBooleanSensorConfiguration : MTRGenericCluster +@interface MTRClusterBooleanStateConfiguration : MTRGenericCluster -- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeCurrentSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; @@ -3355,7 +3355,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRClusterBooleanSensorConfiguration (Availability) +@interface MTRClusterBooleanStateConfiguration (Availability) /** * For all instance methods that take a completion (i.e. command invocations), diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index b9bac2ab63cfd3..1108e9c4678a67 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -8948,12 +8948,12 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d @end -@implementation MTRClusterBooleanSensorConfiguration +@implementation MTRClusterBooleanStateConfiguration -- (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams + params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; } @@ -8963,7 +8963,7 @@ - (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BooleanSensorConfiguration::Commands::SuppressAlarm::Type; + using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8977,10 +8977,10 @@ - (void)suppressAlarmWithParams:(MTRBooleanSensorConfigurationClusterSuppressAla completion:responseHandler]; } -- (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams + params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; } @@ -8990,7 +8990,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnable auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type; + using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -9006,7 +9006,7 @@ - (void)enableDisableAlarmWithParams:(MTRBooleanSensorConfigurationClusterEnable - (NSDictionary * _Nullable)readAttributeCurrentSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeCurrentSensitivityLevelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID) params:params]; } - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -9017,72 +9017,72 @@ - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary * _Nullable)readAttributeSupportedSensitivityLevelsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSupportedSensitivityLevelsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSupportedSensitivityLevelsID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeDefaultSensitivityLevelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeDefaultSensitivityLevelID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsActiveID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsActiveID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsSuppressedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSuppressedID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSuppressedID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsEnabledID) params:params]; } - (NSDictionary * _Nullable)readAttributeAlarmsSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeSensorFaultWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensorFaultID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSensorFaultID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeClusterRevisionID) params:params]; } @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index ea111960e3143a..f8622072dc609e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -5596,7 +5596,7 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRBooleanSensorConfigurationClusterSuppressAlarmParams : NSObject +@interface MTRBooleanStateConfigurationClusterSuppressAlarmParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull alarmsToSuppress MTR_PROVISIONALLY_AVAILABLE; /** @@ -5626,7 +5626,7 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams : NSObject +@interface MTRBooleanStateConfigurationClusterEnableDisableAlarmParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull alarmsToEnableDisable MTR_PROVISIONALLY_AVAILABLE; /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index a3555a2b386462..ddd0fa49e43907 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -15382,7 +15382,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBooleanSensorConfigurationClusterSuppressAlarmParams +@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams - (instancetype)init { if (self = [super init]) { @@ -15396,7 +15396,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; other.alarmsToSuppress = self.alarmsToSuppress; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -15413,11 +15413,11 @@ - (NSString *)description @end -@implementation MTRBooleanSensorConfigurationClusterSuppressAlarmParams (InternalMethods) +@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Type encodableStruct; + chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type encodableStruct; ListFreer listFreer; { encodableStruct.alarmsToSuppress = static_cast>(self.alarmsToSuppress.unsignedCharValue); @@ -15461,7 +15461,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams +@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams - (instancetype)init { if (self = [super init]) { @@ -15475,7 +15475,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; other.alarmsToEnableDisable = self.alarmsToEnableDisable; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -15492,11 +15492,11 @@ - (NSString *)description @end -@implementation MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams (InternalMethods) +@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type encodableStruct; + chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type encodableStruct; ListFreer listFreer; { encodableStruct.alarmsToEnableDisable = static_cast>(self.alarmsToEnableDisable.unsignedCharValue); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index c4a087a7b3d9b9..f5738ad6af5b1b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -994,13 +994,13 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRBooleanSensorConfigurationClusterSuppressAlarmParams (InternalMethods) +@interface MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams (InternalMethods) +@interface MTRBooleanStateConfigurationClusterEnableDisableAlarmParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index a3dbd7d0369423..8d20da304754e6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -572,9 +572,9 @@ static BOOL CommandNeedsTimedInvokeInActivatedCarbonFilterMonitoringCluster(Attr } } } -static BOOL CommandNeedsTimedInvokeInBooleanSensorConfigurationCluster(AttributeId aAttributeId) +static BOOL CommandNeedsTimedInvokeInBooleanStateConfigurationCluster(AttributeId aAttributeId) { - using namespace Clusters::BooleanSensorConfiguration; + using namespace Clusters::BooleanStateConfiguration; switch (aAttributeId) { default: { return NO; @@ -1248,8 +1248,8 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::ActivatedCarbonFilterMonitoring::Id: { return CommandNeedsTimedInvokeInActivatedCarbonFilterMonitoringCluster(commandID); } - case Clusters::BooleanSensorConfiguration::Id: { - return CommandNeedsTimedInvokeInBooleanSensorConfigurationCluster(commandID); + case Clusters::BooleanStateConfiguration::Id: { + return CommandNeedsTimedInvokeInBooleanStateConfigurationCluster(commandID); } case Clusters::ValveConfigurationAndControl::Id: { return CommandNeedsTimedInvokeInValveConfigurationAndControlCluster(commandID); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 9edd4c28356b01..637e115dd7d6ae 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -2366,9 +2366,9 @@ static id _Nullable DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster( *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForBooleanSensorConfigurationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeEventPayloadForBooleanStateConfigurationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::BooleanSensorConfiguration; + using namespace Clusters::BooleanStateConfiguration; switch (aEventId) { case Events::AlarmsStateChanged::Id: { Events::AlarmsStateChanged::DecodableType cppValue; @@ -2377,7 +2377,7 @@ static id _Nullable DecodeEventPayloadForBooleanSensorConfigurationCluster(Event return nil; } - __auto_type * value = [MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent new]; + __auto_type * value = [MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent new]; do { NSNumber * _Nonnull memberValue; @@ -2403,7 +2403,7 @@ static id _Nullable DecodeEventPayloadForBooleanSensorConfigurationCluster(Event return nil; } - __auto_type * value = [MTRBooleanSensorConfigurationClusterSensorFaultEvent new]; + __auto_type * value = [MTRBooleanStateConfigurationClusterSensorFaultEvent new]; do { NSNumber * _Nonnull memberValue; @@ -4429,8 +4429,8 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ActivatedCarbonFilterMonitoring::Id: { return DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster(aPath.mEventId, aReader, aError); } - case Clusters::BooleanSensorConfiguration::Id: { - return DecodeEventPayloadForBooleanSensorConfigurationCluster(aPath.mEventId, aReader, aError); + case Clusters::BooleanStateConfiguration::Id: { + return DecodeEventPayloadForBooleanStateConfigurationCluster(aPath.mEventId, aReader, aError); } case Clusters::ValveConfigurationAndControl::Id: { return DecodeEventPayloadForValveConfigurationAndControlCluster(aPath.mEventId, aReader, aError); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index f626ac4a153bed..9913ef67687a92 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1053,13 +1053,13 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent : NSObject +@interface MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull alarmsActive MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable alarmsSuppressed MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRBooleanSensorConfigurationClusterSensorFaultEvent : NSObject +@interface MTRBooleanStateConfigurationClusterSensorFaultEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull sensorFault MTR_PROVISIONALLY_AVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 17b9b7025a573e..98107b5fdbf6f1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -4203,7 +4203,7 @@ - (NSString *)description @end -@implementation MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent +@implementation MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent - (instancetype)init { if (self = [super init]) { @@ -4217,7 +4217,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterAlarmsStateChangedEvent alloc] init]; other.alarmsActive = self.alarmsActive; other.alarmsSuppressed = self.alarmsSuppressed; @@ -4233,7 +4233,7 @@ - (NSString *)description @end -@implementation MTRBooleanSensorConfigurationClusterSensorFaultEvent +@implementation MTRBooleanStateConfigurationClusterSensorFaultEvent - (instancetype)init { if (self = [super init]) { @@ -4245,7 +4245,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRBooleanSensorConfigurationClusterSensorFaultEvent alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterSensorFaultEvent alloc] init]; other.sensorFault = self.sensorFault; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index f5038359ea059b..759f5d19e7229d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -9375,7 +9375,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { namespace Attributes { namespace CurrentSensitivityLevel { @@ -9385,7 +9385,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9404,7 +9404,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } } // namespace CurrentSensitivityLevel @@ -9416,7 +9416,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9435,7 +9435,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } } // namespace SupportedSensitivityLevels @@ -9447,7 +9447,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9466,20 +9466,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } } // namespace DefaultSensitivityLevel namespace AlarmsActive { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9488,9 +9487,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9498,20 +9497,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9520,9 +9518,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9530,20 +9528,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9552,9 +9549,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9562,20 +9559,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9584,9 +9580,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9594,7 +9590,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) + chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9616,10 +9612,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, - chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9627,7 +9622,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } } // namespace SensorFault @@ -9639,7 +9634,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9658,7 +9653,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -9670,7 +9665,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9689,13 +9684,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 22da5943054af3..e741afea956c80 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1832,7 +1832,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { namespace Attributes { namespace CurrentSensitivityLevel { @@ -1852,33 +1852,33 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); namespace AlarmsActive { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace AlarmsActive namespace AlarmsSuppressed { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace AlarmsSuppressed namespace AlarmsEnabled { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace AlarmsEnabled namespace AlarmsSupported { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace AlarmsSupported namespace SensorFault { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // SensorFaultBitmap + chip::BitMask * value); // SensorFaultBitmap EmberAfStatus Set(chip::EndpointId endpoint, - chip::BitMask value); + chip::BitMask value); } // namespace SensorFault namespace FeatureMap { @@ -1892,7 +1892,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 8b400399b54c55..b50dfd3728b188 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -537,13 +537,13 @@ void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint); */ void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId endpoint); -/** @brief Boolean Sensor Configuration Cluster Init +/** @brief Boolean State Configuration Cluster Init * * Cluster Init * * @param endpoint Endpoint that is being initialized */ -void emberAfBooleanSensorConfigurationClusterInitCallback(chip::EndpointId endpoint); +void emberAfBooleanStateConfigurationClusterInitCallback(chip::EndpointId endpoint); /** @brief Valve Configuration and Control Cluster Init * @@ -5793,42 +5793,42 @@ void emberAfActivatedCarbonFilterMonitoringClusterServerTickCallback(chip::Endpo void emberAfActivatedCarbonFilterMonitoringClusterClientTickCallback(chip::EndpointId endpoint); // -// Boolean Sensor Configuration Cluster +// Boolean State Configuration Cluster // -/** @brief Boolean Sensor Configuration Cluster Server Init +/** @brief Boolean State Configuration Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfBooleanSensorConfigurationClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfBooleanStateConfigurationClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Boolean Sensor Configuration Cluster Server Shutdown +/** @brief Boolean State Configuration Cluster Server Shutdown * * Server Shutdown * * @param endpoint Endpoint that is being shutdown */ -void MatterBooleanSensorConfigurationClusterServerShutdownCallback(chip::EndpointId endpoint); +void MatterBooleanStateConfigurationClusterServerShutdownCallback(chip::EndpointId endpoint); -/** @brief Boolean Sensor Configuration Cluster Client Init +/** @brief Boolean State Configuration Cluster Client Init * * Client Init * * @param endpoint Endpoint that is being initialized */ -void emberAfBooleanSensorConfigurationClusterClientInitCallback(chip::EndpointId endpoint); +void emberAfBooleanStateConfigurationClusterClientInitCallback(chip::EndpointId endpoint); -/** @brief Boolean Sensor Configuration Cluster Server Attribute Changed +/** @brief Boolean State Configuration Cluster Server Attribute Changed * * Server Attribute Changed * * @param attributePath Concrete attribute path that changed */ -void MatterBooleanSensorConfigurationClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); +void MatterBooleanStateConfigurationClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); -/** @brief Boolean Sensor Configuration Cluster Server Pre Attribute Changed +/** @brief Boolean State Configuration Cluster Server Pre Attribute Changed * * Server Pre Attribute Changed * @@ -5837,10 +5837,10 @@ void MatterBooleanSensorConfigurationClusterServerAttributeChangedCallback(const * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status MatterBooleanSensorConfigurationClusterServerPreAttributeChangedCallback( +chip::Protocols::InteractionModel::Status MatterBooleanStateConfigurationClusterServerPreAttributeChangedCallback( const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Boolean Sensor Configuration Cluster Client Pre Attribute Changed +/** @brief Boolean State Configuration Cluster Client Pre Attribute Changed * * Client Pre Attribute Changed * @@ -5849,24 +5849,24 @@ chip::Protocols::InteractionModel::Status MatterBooleanSensorConfigurationCluste * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status MatterBooleanSensorConfigurationClusterClientPreAttributeChangedCallback( +chip::Protocols::InteractionModel::Status MatterBooleanStateConfigurationClusterClientPreAttributeChangedCallback( const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Boolean Sensor Configuration Cluster Server Tick +/** @brief Boolean State Configuration Cluster Server Tick * * Server Tick * * @param endpoint Endpoint that is being served */ -void emberAfBooleanSensorConfigurationClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfBooleanStateConfigurationClusterServerTickCallback(chip::EndpointId endpoint); -/** @brief Boolean Sensor Configuration Cluster Client Tick +/** @brief Boolean State Configuration Cluster Client Tick * * Client Tick * * @param endpoint Endpoint that is being served */ -void emberAfBooleanSensorConfigurationClusterClientTickCallback(chip::EndpointId endpoint); +void emberAfBooleanStateConfigurationClusterClientTickCallback(chip::EndpointId endpoint); // // Valve Configuration and Control Cluster @@ -10109,17 +10109,17 @@ bool emberAfMicrowaveOvenControlClusterAddMoreTimeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::DecodableType & commandData); /** - * @brief Boolean Sensor Configuration Cluster SuppressAlarm Command callback (from client) + * @brief Boolean State Configuration Cluster SuppressAlarm Command callback (from client) */ -bool emberAfBooleanSensorConfigurationClusterSuppressAlarmCallback( +bool emberAfBooleanStateConfigurationClusterSuppressAlarmCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::DecodableType & commandData); + const chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::DecodableType & commandData); /** - * @brief Boolean Sensor Configuration Cluster EnableDisableAlarm Command callback (from client) + * @brief Boolean State Configuration Cluster EnableDisableAlarm Command callback (from client) */ -bool emberAfBooleanSensorConfigurationClusterEnableDisableAlarmCallback( +bool emberAfBooleanStateConfigurationClusterEnableDisableAlarmCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::DecodableType & commandData); + const chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::DecodableType & commandData); /** * @brief Valve Configuration and Control Cluster Open Command callback (from client) */ 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 cddc491525028e..213337760f80b0 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 @@ -2125,7 +2125,7 @@ enum class Feature : uint32_t }; } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { // Bitmap for AlarmModeBitmap enum class AlarmModeBitmap : uint8_t @@ -2148,7 +2148,7 @@ enum class SensorFaultBitmap : uint16_t { kGneralFault = 0x1, }; -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { 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 41b80a9db8dc67..fdcb0949b59605 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 @@ -13649,7 +13649,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { namespace Commands { namespace SuppressAlarm { @@ -13839,7 +13839,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace SensorFault. } // namespace Events -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { namespace Commands { @@ -28414,7 +28414,7 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::BooleanSensorConfiguration::Id: { + case Clusters::BooleanStateConfiguration::Id: { switch (aCommand) { default: 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 2dc17e952a6e6d..643b30041294bf 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 @@ -19507,7 +19507,7 @@ struct TypeInfo }; } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { namespace Commands { // Forward-declarations so we can reference these later. @@ -19536,7 +19536,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::SuppressAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } chip::BitMask alarmsToSuppress = static_cast>(0); @@ -19551,7 +19551,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::SuppressAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } chip::BitMask alarmsToSuppress = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -19568,7 +19568,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::EnableDisableAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } chip::BitMask alarmsToEnableDisable = static_cast>(0); @@ -19583,7 +19583,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::EnableDisableAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } chip::BitMask alarmsToEnableDisable = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -19600,7 +19600,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentSensitivityLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19612,7 +19612,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedSensitivityLevels::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19624,7 +19624,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::DefaultSensitivityLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19632,11 +19632,11 @@ struct TypeInfo namespace AlarmsActive { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsActive::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19644,11 +19644,11 @@ struct TypeInfo namespace AlarmsSuppressed { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsSuppressed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19656,11 +19656,11 @@ struct TypeInfo namespace AlarmsEnabled { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsEnabled::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19668,11 +19668,11 @@ struct TypeInfo namespace AlarmsSupported { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsSupported::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19680,11 +19680,11 @@ struct TypeInfo namespace SensorFault { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SensorFault::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -19692,37 +19692,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } }; } // namespace ClusterRevision @@ -19730,7 +19730,7 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); @@ -19738,15 +19738,15 @@ struct TypeInfo Attributes::SupportedSensitivityLevels::TypeInfo::DecodableType supportedSensitivityLevels = static_cast(0); Attributes::DefaultSensitivityLevel::TypeInfo::DecodableType defaultSensitivityLevel = static_cast(0); Attributes::AlarmsActive::TypeInfo::DecodableType alarmsActive = - static_cast>(0); + static_cast>(0); Attributes::AlarmsSuppressed::TypeInfo::DecodableType alarmsSuppressed = - static_cast>(0); + static_cast>(0); Attributes::AlarmsEnabled::TypeInfo::DecodableType alarmsEnabled = - static_cast>(0); + static_cast>(0); Attributes::AlarmsSupported::TypeInfo::DecodableType alarmsSupported = - static_cast>(0); + static_cast>(0); Attributes::SensorFault::TypeInfo::DecodableType sensorFault = - static_cast>(0); + static_cast>(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -19771,7 +19771,7 @@ struct Type public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::AlarmsStateChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr bool kIsFabricScoped = false; chip::BitMask alarmsActive = static_cast>(0); @@ -19785,7 +19785,7 @@ struct DecodableType public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::AlarmsStateChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } chip::BitMask alarmsActive = static_cast>(0); Optional> alarmsSuppressed; @@ -19806,7 +19806,7 @@ struct Type public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::SensorFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } static constexpr bool kIsFabricScoped = false; chip::BitMask sensorFault = static_cast>(0); @@ -19819,7 +19819,7 @@ struct DecodableType public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } static constexpr EventId GetEventId() { return Events::SensorFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanStateConfiguration::Id; } chip::BitMask sensorFault = static_cast>(0); @@ -19827,7 +19827,7 @@ struct DecodableType }; } // namespace SensorFault } // namespace Events -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { namespace Commands { 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 22bc329312921f..dbd1e568b6e348 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 @@ -3513,7 +3513,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { namespace Attributes { namespace CurrentSensitivityLevel { @@ -3573,7 +3573,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace ClusterRevision } // namespace Attributes -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 30795284640706..3bcd1734de0353 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -214,9 +214,9 @@ static constexpr ClusterId Id = 0x00000071; namespace ActivatedCarbonFilterMonitoring { static constexpr ClusterId Id = 0x00000072; } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { static constexpr ClusterId Id = 0x00000080; -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { static constexpr ClusterId Id = 0x00000081; } // namespace ValveConfigurationAndControl diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 139997c474846f..95c4ca8d039278 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -913,7 +913,7 @@ static constexpr CommandId Id = 0x00000000; } // namespace Commands } // namespace ActivatedCarbonFilterMonitoring -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { namespace Commands { namespace SuppressAlarm { @@ -925,7 +925,7 @@ static constexpr CommandId Id = 0x00000001; } // namespace EnableDisableAlarm } // namespace Commands -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h index 9fadaafb4062d3..1ce91c4aa0008f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -379,7 +379,7 @@ static constexpr EventId Id = 0x00000001; } // namespace Events } // namespace RvcOperationalState -namespace BooleanSensorConfiguration { +namespace BooleanStateConfiguration { namespace Events { namespace AlarmsStateChanged { @@ -391,7 +391,7 @@ static constexpr EventId Id = 0x00000001; } // namespace SensorFault } // namespace Events -} // namespace BooleanSensorConfiguration +} // namespace BooleanStateConfiguration namespace ValveConfigurationAndControl { namespace Events { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index dce92e23194866..a2f0dd80afba47 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -428,11 +428,11 @@ #define CHIP_PRINTCLUSTER_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER #endif -#if defined(ZCL_USING_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER \ - { chip::app::Clusters::BooleanSensorConfiguration::Id, "Boolean Sensor Configuration" }, +#if defined(ZCL_USING_BOOLEAN_STATE_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_BOOLEAN_STATE_CONFIGURATION_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CONFIGURATION_CLUSTER \ + { chip::app::Clusters::BooleanStateConfiguration::Id, "Boolean State Configuration" }, #else -#define CHIP_PRINTCLUSTER_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER +#define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CONFIGURATION_CLUSTER #endif #if defined(ZCL_USING_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER) || \ @@ -823,7 +823,7 @@ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_RVC_CLUSTER \ CHIP_PRINTCLUSTER_HEPA_FILTER_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER \ - CHIP_PRINTCLUSTER_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER \ + CHIP_PRINTCLUSTER_BOOLEAN_STATE_CONFIGURATION_CLUSTER \ CHIP_PRINTCLUSTER_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER \ CHIP_PRINTCLUSTER_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER \ CHIP_PRINTCLUSTER_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 60a098f9eeabbf..8b1890713ae2de 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -97,7 +97,7 @@ | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | -| BooleanSensorConfiguration | 0x0080 | +| BooleanStateConfiguration | 0x0080 | | ValveConfigurationAndControl | 0x0081 | | ElectricalEnergyMeasurement | 0x0091 | | DemandResponseLoadControl | 0x0096 | @@ -6371,7 +6371,7 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand }; /*----------------------------------------------------------------------------*\ -| Cluster BooleanSensorConfiguration | 0x0080 | +| Cluster BooleanStateConfiguration | 0x0080 | |------------------------------------------------------------------------------| | Commands: | | | * SuppressAlarm | 0x00 | @@ -6401,10 +6401,10 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand /* * Command SuppressAlarm */ -class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand +class BooleanStateConfigurationSuppressAlarm : public ClusterCommand { public: - BooleanSensorConfigurationSuppressAlarm(CredentialIssuerCommands * credsIssuerConfig) : + BooleanStateConfigurationSuppressAlarm(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("suppress-alarm", credsIssuerConfig) { AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); @@ -6413,8 +6413,8 @@ class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6423,8 +6423,8 @@ class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6433,16 +6433,16 @@ class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand } private: - chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Type mRequest; + chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type mRequest; }; /* * Command EnableDisableAlarm */ -class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand +class BooleanStateConfigurationEnableDisableAlarm : public ClusterCommand { public: - BooleanSensorConfigurationEnableDisableAlarm(CredentialIssuerCommands * credsIssuerConfig) : + BooleanStateConfigurationEnableDisableAlarm(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enable-disable-alarm", credsIssuerConfig) { AddArgument("AlarmsToEnableDisable", 0, UINT8_MAX, &mRequest.alarmsToEnableDisable); @@ -6451,8 +6451,8 @@ class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6461,8 +6461,8 @@ class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6471,7 +6471,7 @@ class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand } private: - chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type mRequest; + chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -19215,19 +19215,19 @@ void registerClusterActivatedCarbonFilterMonitoring(Commands & commands, Credent commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBooleanSensorConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterBooleanStateConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BooleanSensorConfiguration; + using namespace chip::app::Clusters::BooleanStateConfiguration; - const char * clusterName = "BooleanSensorConfiguration"; + const char * clusterName = "BooleanStateConfiguration"; commands_list clusterCommands = { // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -19255,17 +19255,17 @@ void registerClusterBooleanSensorConfiguration(Commands & commands, CredentialIs credsIssuerConfig), // make_unique>(Id, "default-sensitivity-level", 0, UINT8_MAX, Attributes::DefaultSensitivityLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "alarms-active", 0, UINT8_MAX, Attributes::AlarmsActive::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "alarms-suppressed", 0, UINT8_MAX, Attributes::AlarmsSuppressed::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "alarms-enabled", 0, UINT8_MAX, Attributes::AlarmsEnabled::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "alarms-supported", 0, UINT8_MAX, Attributes::AlarmsSupported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( + make_unique>>( Id, "sensor-fault", 0, UINT16_MAX, Attributes::SensorFault::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, @@ -25443,7 +25443,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterRvcOperationalState(commands, credsIssuerConfig); registerClusterHepaFilterMonitoring(commands, credsIssuerConfig); registerClusterActivatedCarbonFilterMonitoring(commands, credsIssuerConfig); - registerClusterBooleanSensorConfiguration(commands, credsIssuerConfig); + registerClusterBooleanStateConfiguration(commands, credsIssuerConfig); registerClusterValveConfigurationAndControl(commands, credsIssuerConfig); registerClusterElectricalEnergyMeasurement(commands, credsIssuerConfig); registerClusterDemandResponseLoadControl(commands, 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 db35a30c8336e6..f79f344e272822 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5481,7 +5481,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BooleanSensorConfiguration::Events::AlarmsStateChanged::DecodableType & value) + const BooleanStateConfiguration::Events::AlarmsStateChanged::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -5505,7 +5505,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const BooleanSensorConfiguration::Events::SensorFault::DecodableType & value) + const BooleanStateConfiguration::Events::SensorFault::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -11534,75 +11534,75 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case BooleanSensorConfiguration::Id: { + case BooleanStateConfiguration::Id: { switch (path.mAttributeId) { - case BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::Id: { + case BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentSensitivityLevel", 1, value); } - case BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::Id: { + case BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedSensitivityLevels", 1, value); } - case BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::Id: { + case BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("DefaultSensitivityLevel", 1, value); } - case BooleanSensorConfiguration::Attributes::AlarmsActive::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::AlarmsActive::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AlarmsActive", 1, value); } - case BooleanSensorConfiguration::Attributes::AlarmsSuppressed::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::AlarmsSuppressed::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AlarmsSuppressed", 1, value); } - case BooleanSensorConfiguration::Attributes::AlarmsEnabled::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::AlarmsEnabled::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AlarmsEnabled", 1, value); } - case BooleanSensorConfiguration::Attributes::AlarmsSupported::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::AlarmsSupported::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AlarmsSupported", 1, value); } - case BooleanSensorConfiguration::Attributes::SensorFault::Id: { - chip::BitMask value; + case BooleanStateConfiguration::Attributes::SensorFault::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SensorFault", 1, value); } - case BooleanSensorConfiguration::Attributes::GeneratedCommandList::Id: { + case BooleanStateConfiguration::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case BooleanSensorConfiguration::Attributes::AcceptedCommandList::Id: { + case BooleanStateConfiguration::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case BooleanSensorConfiguration::Attributes::EventList::Id: { + case BooleanStateConfiguration::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case BooleanSensorConfiguration::Attributes::AttributeList::Id: { + case BooleanStateConfiguration::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case BooleanSensorConfiguration::Attributes::FeatureMap::Id: { + case BooleanStateConfiguration::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case BooleanSensorConfiguration::Attributes::ClusterRevision::Id: { + case BooleanStateConfiguration::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -17800,16 +17800,16 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } - case BooleanSensorConfiguration::Id: { + case BooleanStateConfiguration::Id: { switch (header.mPath.mEventId) { - case BooleanSensorConfiguration::Events::AlarmsStateChanged::Id: { - chip::app::Clusters::BooleanSensorConfiguration::Events::AlarmsStateChanged::DecodableType value; + case BooleanStateConfiguration::Events::AlarmsStateChanged::Id: { + chip::app::Clusters::BooleanStateConfiguration::Events::AlarmsStateChanged::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AlarmsStateChanged", 1, value); } - case BooleanSensorConfiguration::Events::SensorFault::Id: { - chip::app::Clusters::BooleanSensorConfiguration::Events::SensorFault::DecodableType value; + case BooleanStateConfiguration::Events::SensorFault::Id: { + chip::app::Clusters::BooleanStateConfiguration::Events::SensorFault::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SensorFault", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 5dc0cb3d19ef90..fb7a5fc2b80ef4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -462,11 +462,10 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RvcOperationalState::Events::OperationalError::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RvcOperationalState::Events::OperationCompletion::DecodableType & value); -static CHIP_ERROR -LogValue(const char * label, size_t indent, - const chip::app::Clusters::BooleanSensorConfiguration::Events::AlarmsStateChanged::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::BooleanSensorConfiguration::Events::SensorFault::DecodableType & value); + const chip::app::Clusters::BooleanStateConfiguration::Events::AlarmsStateChanged::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::BooleanStateConfiguration::Events::SensorFault::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ValveConfigurationAndControl::Events::ValveStateChanged::DecodableType & 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 167a572b063ed7..601674f15bbfa9 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -100,7 +100,7 @@ | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | -| BooleanSensorConfiguration | 0x0080 | +| BooleanStateConfiguration | 0x0080 | | ValveConfigurationAndControl | 0x0081 | | ElectricalEnergyMeasurement | 0x0091 | | DemandResponseLoadControl | 0x0096 | @@ -73312,7 +73312,7 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster BooleanSensorConfiguration | 0x0080 | +| Cluster BooleanStateConfiguration | 0x0080 | |------------------------------------------------------------------------------| | Commands: | | | * SuppressAlarm | 0x00 | @@ -73343,9 +73343,9 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public /* * Command SuppressAlarm */ -class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand { +class BooleanStateConfigurationSuppressAlarm : public ClusterCommand { public: - BooleanSensorConfigurationSuppressAlarm() + BooleanStateConfigurationSuppressAlarm() : ClusterCommand("suppress-alarm") { #if MTR_ENABLE_PROVISIONAL @@ -73356,14 +73356,14 @@ class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBooleanSensorConfigurationClusterSuppressAlarmParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.alarmsToSuppress = [NSNumber numberWithUnsignedChar:mRequest.alarmsToSuppress.Raw()]; @@ -73388,7 +73388,7 @@ class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand { } private: - chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressAlarm::Type mRequest; + chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -73396,9 +73396,9 @@ class BooleanSensorConfigurationSuppressAlarm : public ClusterCommand { /* * Command EnableDisableAlarm */ -class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand { +class BooleanStateConfigurationEnableDisableAlarm : public ClusterCommand { public: - BooleanSensorConfigurationEnableDisableAlarm() + BooleanStateConfigurationEnableDisableAlarm() : ClusterCommand("enable-disable-alarm") { #if MTR_ENABLE_PROVISIONAL @@ -73409,14 +73409,14 @@ class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBooleanSensorConfigurationClusterEnableDisableAlarmParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.alarmsToEnableDisable = [NSNumber numberWithUnsignedChar:mRequest.alarmsToEnableDisable.Raw()]; @@ -73441,7 +73441,7 @@ class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand { } private: - chip::app::Clusters::BooleanSensorConfiguration::Commands::EnableDisableAlarm::Type mRequest; + chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -73451,32 +73451,32 @@ class BooleanSensorConfigurationEnableDisableAlarm : public ClusterCommand { /* * Attribute CurrentSensitivityLevel */ -class ReadBooleanSensorConfigurationCurrentSensitivityLevel : public ReadAttribute { +class ReadBooleanStateConfigurationCurrentSensitivityLevel : public ReadAttribute { public: - ReadBooleanSensorConfigurationCurrentSensitivityLevel() + ReadBooleanStateConfigurationCurrentSensitivityLevel() : ReadAttribute("current-sensitivity-level") { } - ~ReadBooleanSensorConfigurationCurrentSensitivityLevel() + ~ReadBooleanStateConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.CurrentSensitivityLevel response %@", [value description]); + NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration CurrentSensitivityLevel read Error", error); + LogNSError("BooleanStateConfiguration CurrentSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73485,9 +73485,9 @@ class ReadBooleanSensorConfigurationCurrentSensitivityLevel : public ReadAttribu } }; -class WriteBooleanSensorConfigurationCurrentSensitivityLevel : public WriteAttribute { +class WriteBooleanStateConfigurationCurrentSensitivityLevel : public WriteAttribute { public: - WriteBooleanSensorConfigurationCurrentSensitivityLevel() + WriteBooleanStateConfigurationCurrentSensitivityLevel() : WriteAttribute("current-sensitivity-level") { AddArgument("attr-name", "current-sensitivity-level"); @@ -73495,18 +73495,18 @@ class WriteBooleanSensorConfigurationCurrentSensitivityLevel : public WriteAttri WriteAttribute::AddArguments(); } - ~WriteBooleanSensorConfigurationCurrentSensitivityLevel() + ~WriteBooleanStateConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -73514,7 +73514,7 @@ class WriteBooleanSensorConfigurationCurrentSensitivityLevel : public WriteAttri [cluster writeAttributeCurrentSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("BooleanSensorConfiguration CurrentSensitivityLevel write Error", error); + LogNSError("BooleanStateConfiguration CurrentSensitivityLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73526,25 +73526,25 @@ class WriteBooleanSensorConfigurationCurrentSensitivityLevel : public WriteAttri uint8_t mValue; }; -class SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel() + SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() : SubscribeAttribute("current-sensitivity-level") { } - ~SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel() + ~SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::CurrentSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73558,7 +73558,7 @@ class SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel : publ [cluster subscribeAttributeCurrentSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.CurrentSensitivityLevel response %@", [value description]); + NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73577,32 +73577,32 @@ class SubscribeAttributeBooleanSensorConfigurationCurrentSensitivityLevel : publ /* * Attribute SupportedSensitivityLevels */ -class ReadBooleanSensorConfigurationSupportedSensitivityLevels : public ReadAttribute { +class ReadBooleanStateConfigurationSupportedSensitivityLevels : public ReadAttribute { public: - ReadBooleanSensorConfigurationSupportedSensitivityLevels() + ReadBooleanStateConfigurationSupportedSensitivityLevels() : ReadAttribute("supported-sensitivity-levels") { } - ~ReadBooleanSensorConfigurationSupportedSensitivityLevels() + ~ReadBooleanStateConfigurationSupportedSensitivityLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedSensitivityLevelsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.SupportedSensitivityLevels response %@", [value description]); + NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration SupportedSensitivityLevels read Error", error); + LogNSError("BooleanStateConfiguration SupportedSensitivityLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73611,25 +73611,25 @@ class ReadBooleanSensorConfigurationSupportedSensitivityLevels : public ReadAttr } }; -class SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels() + SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() : SubscribeAttribute("supported-sensitivity-levels") { } - ~SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels() + ~SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SupportedSensitivityLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73643,7 +73643,7 @@ class SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels : p [cluster subscribeAttributeSupportedSensitivityLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.SupportedSensitivityLevels response %@", [value description]); + NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73662,32 +73662,32 @@ class SubscribeAttributeBooleanSensorConfigurationSupportedSensitivityLevels : p /* * Attribute DefaultSensitivityLevel */ -class ReadBooleanSensorConfigurationDefaultSensitivityLevel : public ReadAttribute { +class ReadBooleanStateConfigurationDefaultSensitivityLevel : public ReadAttribute { public: - ReadBooleanSensorConfigurationDefaultSensitivityLevel() + ReadBooleanStateConfigurationDefaultSensitivityLevel() : ReadAttribute("default-sensitivity-level") { } - ~ReadBooleanSensorConfigurationDefaultSensitivityLevel() + ~ReadBooleanStateConfigurationDefaultSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDefaultSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.DefaultSensitivityLevel response %@", [value description]); + NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration DefaultSensitivityLevel read Error", error); + LogNSError("BooleanStateConfiguration DefaultSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73696,25 +73696,25 @@ class ReadBooleanSensorConfigurationDefaultSensitivityLevel : public ReadAttribu } }; -class SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel() + SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() : SubscribeAttribute("default-sensitivity-level") { } - ~SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel() + ~SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::DefaultSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73728,7 +73728,7 @@ class SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel : publ [cluster subscribeAttributeDefaultSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.DefaultSensitivityLevel response %@", [value description]); + NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73747,32 +73747,32 @@ class SubscribeAttributeBooleanSensorConfigurationDefaultSensitivityLevel : publ /* * Attribute AlarmsActive */ -class ReadBooleanSensorConfigurationAlarmsActive : public ReadAttribute { +class ReadBooleanStateConfigurationAlarmsActive : public ReadAttribute { public: - ReadBooleanSensorConfigurationAlarmsActive() + ReadBooleanStateConfigurationAlarmsActive() : ReadAttribute("alarms-active") { } - ~ReadBooleanSensorConfigurationAlarmsActive() + ~ReadBooleanStateConfigurationAlarmsActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsActive::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAlarmsActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsActive response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration AlarmsActive read Error", error); + LogNSError("BooleanStateConfiguration AlarmsActive read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73781,25 +73781,25 @@ class ReadBooleanSensorConfigurationAlarmsActive : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationAlarmsActive : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAlarmsActive : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationAlarmsActive() + SubscribeAttributeBooleanStateConfigurationAlarmsActive() : SubscribeAttribute("alarms-active") { } - ~SubscribeAttributeBooleanSensorConfigurationAlarmsActive() + ~SubscribeAttributeBooleanStateConfigurationAlarmsActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsActive::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73813,7 +73813,7 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsActive : public Subscrib [cluster subscribeAttributeAlarmsActiveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsActive response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73832,32 +73832,32 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsActive : public Subscrib /* * Attribute AlarmsSuppressed */ -class ReadBooleanSensorConfigurationAlarmsSuppressed : public ReadAttribute { +class ReadBooleanStateConfigurationAlarmsSuppressed : public ReadAttribute { public: - ReadBooleanSensorConfigurationAlarmsSuppressed() + ReadBooleanStateConfigurationAlarmsSuppressed() : ReadAttribute("alarms-suppressed") { } - ~ReadBooleanSensorConfigurationAlarmsSuppressed() + ~ReadBooleanStateConfigurationAlarmsSuppressed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSuppressed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAlarmsSuppressedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsSuppressed response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsSuppressed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration AlarmsSuppressed read Error", error); + LogNSError("BooleanStateConfiguration AlarmsSuppressed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73866,25 +73866,25 @@ class ReadBooleanSensorConfigurationAlarmsSuppressed : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed() + SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() : SubscribeAttribute("alarms-suppressed") { } - ~SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed() + ~SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSuppressed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73898,7 +73898,7 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed : public Subs [cluster subscribeAttributeAlarmsSuppressedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsSuppressed response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsSuppressed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73917,32 +73917,32 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed : public Subs /* * Attribute AlarmsEnabled */ -class ReadBooleanSensorConfigurationAlarmsEnabled : public ReadAttribute { +class ReadBooleanStateConfigurationAlarmsEnabled : public ReadAttribute { public: - ReadBooleanSensorConfigurationAlarmsEnabled() + ReadBooleanStateConfigurationAlarmsEnabled() : ReadAttribute("alarms-enabled") { } - ~ReadBooleanSensorConfigurationAlarmsEnabled() + ~ReadBooleanStateConfigurationAlarmsEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAlarmsEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsEnabled response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration AlarmsEnabled read Error", error); + LogNSError("BooleanStateConfiguration AlarmsEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73951,25 +73951,25 @@ class ReadBooleanSensorConfigurationAlarmsEnabled : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAlarmsEnabled : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() + SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() : SubscribeAttribute("alarms-enabled") { } - ~SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() + ~SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73983,7 +73983,7 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled : public Subscri [cluster subscribeAttributeAlarmsEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsEnabled response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74002,32 +74002,32 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled : public Subscri /* * Attribute AlarmsSupported */ -class ReadBooleanSensorConfigurationAlarmsSupported : public ReadAttribute { +class ReadBooleanStateConfigurationAlarmsSupported : public ReadAttribute { public: - ReadBooleanSensorConfigurationAlarmsSupported() + ReadBooleanStateConfigurationAlarmsSupported() : ReadAttribute("alarms-supported") { } - ~ReadBooleanSensorConfigurationAlarmsSupported() + ~ReadBooleanStateConfigurationAlarmsSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAlarmsSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsSupported response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration AlarmsSupported read Error", error); + LogNSError("BooleanStateConfiguration AlarmsSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74036,25 +74036,25 @@ class ReadBooleanSensorConfigurationAlarmsSupported : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationAlarmsSupported : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAlarmsSupported : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationAlarmsSupported() + SubscribeAttributeBooleanStateConfigurationAlarmsSupported() : SubscribeAttribute("alarms-supported") { } - ~SubscribeAttributeBooleanSensorConfigurationAlarmsSupported() + ~SubscribeAttributeBooleanStateConfigurationAlarmsSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74068,7 +74068,7 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsSupported : public Subsc [cluster subscribeAttributeAlarmsSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AlarmsSupported response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74087,32 +74087,32 @@ class SubscribeAttributeBooleanSensorConfigurationAlarmsSupported : public Subsc /* * Attribute SensorFault */ -class ReadBooleanSensorConfigurationSensorFault : public ReadAttribute { +class ReadBooleanStateConfigurationSensorFault : public ReadAttribute { public: - ReadBooleanSensorConfigurationSensorFault() + ReadBooleanStateConfigurationSensorFault() : ReadAttribute("sensor-fault") { } - ~ReadBooleanSensorConfigurationSensorFault() + ~ReadBooleanStateConfigurationSensorFault() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensorFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSensorFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.SensorFault response %@", [value description]); + NSLog(@"BooleanStateConfiguration.SensorFault response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration SensorFault read Error", error); + LogNSError("BooleanStateConfiguration SensorFault read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74121,25 +74121,25 @@ class ReadBooleanSensorConfigurationSensorFault : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationSensorFault : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationSensorFault : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationSensorFault() + SubscribeAttributeBooleanStateConfigurationSensorFault() : SubscribeAttribute("sensor-fault") { } - ~SubscribeAttributeBooleanSensorConfigurationSensorFault() + ~SubscribeAttributeBooleanStateConfigurationSensorFault() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensorFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74153,7 +74153,7 @@ class SubscribeAttributeBooleanSensorConfigurationSensorFault : public Subscribe [cluster subscribeAttributeSensorFaultWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.SensorFault response %@", [value description]); + NSLog(@"BooleanStateConfiguration.SensorFault response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74172,32 +74172,32 @@ class SubscribeAttributeBooleanSensorConfigurationSensorFault : public Subscribe /* * Attribute GeneratedCommandList */ -class ReadBooleanSensorConfigurationGeneratedCommandList : public ReadAttribute { +class ReadBooleanStateConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadBooleanSensorConfigurationGeneratedCommandList() + ReadBooleanStateConfigurationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadBooleanSensorConfigurationGeneratedCommandList() + ~ReadBooleanStateConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration GeneratedCommandList read Error", error); + LogNSError("BooleanStateConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74206,25 +74206,25 @@ class ReadBooleanSensorConfigurationGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList() + SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList() + ~SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74238,7 +74238,7 @@ class SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74257,32 +74257,32 @@ class SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadBooleanSensorConfigurationAcceptedCommandList : public ReadAttribute { +class ReadBooleanStateConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadBooleanSensorConfigurationAcceptedCommandList() + ReadBooleanStateConfigurationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadBooleanSensorConfigurationAcceptedCommandList() + ~ReadBooleanStateConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration AcceptedCommandList read Error", error); + LogNSError("BooleanStateConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74291,25 +74291,25 @@ class ReadBooleanSensorConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList() + SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList() + ~SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74323,7 +74323,7 @@ class SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList : public S [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74342,32 +74342,32 @@ class SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList : public S /* * Attribute EventList */ -class ReadBooleanSensorConfigurationEventList : public ReadAttribute { +class ReadBooleanStateConfigurationEventList : public ReadAttribute { public: - ReadBooleanSensorConfigurationEventList() + ReadBooleanStateConfigurationEventList() : ReadAttribute("event-list") { } - ~ReadBooleanSensorConfigurationEventList() + ~ReadBooleanStateConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.EventList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration EventList read Error", error); + LogNSError("BooleanStateConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74376,25 +74376,25 @@ class ReadBooleanSensorConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationEventList() + SubscribeAttributeBooleanStateConfigurationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBooleanSensorConfigurationEventList() + ~SubscribeAttributeBooleanStateConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74408,7 +74408,7 @@ class SubscribeAttributeBooleanSensorConfigurationEventList : public SubscribeAt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.EventList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74427,32 +74427,32 @@ class SubscribeAttributeBooleanSensorConfigurationEventList : public SubscribeAt /* * Attribute AttributeList */ -class ReadBooleanSensorConfigurationAttributeList : public ReadAttribute { +class ReadBooleanStateConfigurationAttributeList : public ReadAttribute { public: - ReadBooleanSensorConfigurationAttributeList() + ReadBooleanStateConfigurationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadBooleanSensorConfigurationAttributeList() + ~ReadBooleanStateConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AttributeList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration AttributeList read Error", error); + LogNSError("BooleanStateConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74461,25 +74461,25 @@ class ReadBooleanSensorConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationAttributeList() + SubscribeAttributeBooleanStateConfigurationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBooleanSensorConfigurationAttributeList() + ~SubscribeAttributeBooleanStateConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74493,7 +74493,7 @@ class SubscribeAttributeBooleanSensorConfigurationAttributeList : public Subscri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.AttributeList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74512,32 +74512,32 @@ class SubscribeAttributeBooleanSensorConfigurationAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadBooleanSensorConfigurationFeatureMap : public ReadAttribute { +class ReadBooleanStateConfigurationFeatureMap : public ReadAttribute { public: - ReadBooleanSensorConfigurationFeatureMap() + ReadBooleanStateConfigurationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadBooleanSensorConfigurationFeatureMap() + ~ReadBooleanStateConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.FeatureMap response %@", [value description]); + NSLog(@"BooleanStateConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration FeatureMap read Error", error); + LogNSError("BooleanStateConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74546,25 +74546,25 @@ class ReadBooleanSensorConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationFeatureMap() + SubscribeAttributeBooleanStateConfigurationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBooleanSensorConfigurationFeatureMap() + ~SubscribeAttributeBooleanStateConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74578,7 +74578,7 @@ class SubscribeAttributeBooleanSensorConfigurationFeatureMap : public SubscribeA [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.FeatureMap response %@", [value description]); + NSLog(@"BooleanStateConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74597,32 +74597,32 @@ class SubscribeAttributeBooleanSensorConfigurationFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadBooleanSensorConfigurationClusterRevision : public ReadAttribute { +class ReadBooleanStateConfigurationClusterRevision : public ReadAttribute { public: - ReadBooleanSensorConfigurationClusterRevision() + ReadBooleanStateConfigurationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadBooleanSensorConfigurationClusterRevision() + ~ReadBooleanStateConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"BooleanStateConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanSensorConfiguration ClusterRevision read Error", error); + LogNSError("BooleanStateConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74631,25 +74631,25 @@ class ReadBooleanSensorConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBooleanSensorConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBooleanSensorConfigurationClusterRevision() + SubscribeAttributeBooleanStateConfigurationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBooleanSensorConfigurationClusterRevision() + ~SubscribeAttributeBooleanStateConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::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 = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74663,7 +74663,7 @@ class SubscribeAttributeBooleanSensorConfigurationClusterRevision : public Subsc [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanSensorConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"BooleanStateConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176632,80 +176632,80 @@ void registerClusterActivatedCarbonFilterMonitoring(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); #endif // MTR_ENABLE_PROVISIONAL } -void registerClusterBooleanSensorConfiguration(Commands & commands) +void registerClusterBooleanStateConfiguration(Commands & commands) { #if MTR_ENABLE_PROVISIONAL - using namespace chip::app::Clusters::BooleanSensorConfiguration; + using namespace chip::app::Clusters::BooleanStateConfiguration; - const char * clusterName = "BooleanSensorConfiguration"; + const char * clusterName = "BooleanStateConfiguration"; commands_list clusterCommands = { make_unique(Id), // #if MTR_ENABLE_PROVISIONAL - make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // @@ -180542,7 +180542,7 @@ void registerClusters(Commands & commands) registerClusterRvcOperationalState(commands); registerClusterHepaFilterMonitoring(commands); registerClusterActivatedCarbonFilterMonitoring(commands); - registerClusterBooleanSensorConfiguration(commands); + registerClusterBooleanStateConfiguration(commands); registerClusterValveConfigurationAndControl(commands); registerClusterElectricalEnergyMeasurement(commands); registerClusterDemandResponseLoadControl(commands); From 27128b85bbdf6d6552f9d1c93259007230272a98 Mon Sep 17 00:00:00 2001 From: Fesseha Date: Tue, 12 Dec 2023 17:15:42 +0100 Subject: [PATCH 4/9] update device type and cluster names --- docs/clusters.md | 2 +- .../zcl/data-model/chip/matter-devices.xml | 16 ++++++---------- .../CHIP/zap-generated/MTRDeviceTypeMetadata.mm | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/clusters.md b/docs/clusters.md index 8d1d29a84d2e87..2043c6fe45ffb9 100644 --- a/docs/clusters.md +++ b/docs/clusters.md @@ -75,7 +75,7 @@ Generally regenerate using one of: | 97 | 0x61 | RvcOperationalState | | 113 | 0x71 | HepaFilterMonitoring | | 114 | 0x72 | ActivatedCarbonFilterMonitoring | -| 128 | 0x80 | BooleanSensorConfiguration | +| 128 | 0x80 | BooleanStateConfiguration | | 129 | 0x81 | ValveConfigurationAndControl | | 145 | 0x91 | ElectricalEnergyMeasurement | | 150 | 0x96 | DemandResponseLoadControl | diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index d51b1ce8fad5a5..2f48c3a3ac18f0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -2082,9 +2082,9 @@ limitations under the License. - MA-boolean-sensor + MA-water-freeze-detector CHIP - Matter Boolean Sensor + Matter Water Freeze Detector 0x0103 0x0041 Simple @@ -2092,9 +2092,8 @@ limitations under the License. - - TAG_LIST - + + @@ -2119,14 +2118,11 @@ limitations under the License. 0x0043 Simple Endpoint - Matter Boolean Sensor - - - TAG_LIST - + + diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm index a9ba7e95cc09f4..2c013bba383bb3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm @@ -54,7 +54,7 @@ { 0x0000002B, DeviceTypeClass::Simple, "Matter Fan" }, { 0x0000002C, DeviceTypeClass::Simple, "Matter Air Quality Sensor" }, { 0x0000002D, DeviceTypeClass::Simple, "Matter Air Purifier" }, - { 0x00000041, DeviceTypeClass::Simple, "Matter Boolean Sensor" }, + { 0x00000041, DeviceTypeClass::Simple, "Matter Water Freeze Detector" }, { 0x00000042, DeviceTypeClass::Simple, "Matter Valve" }, { 0x00000043, DeviceTypeClass::Simple, "Matter Water Leak Detector" }, { 0x00000070, DeviceTypeClass::Simple, "Matter Refrigerator" }, From d48fa9ed731f38cc9960a9e86f7e91a0e888bf87 Mon Sep 17 00:00:00 2001 From: fesseha-eve <88329315+fessehaeve@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:56:34 +0100 Subject: [PATCH 5/9] fixed typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: René Josefsen <69624991+ReneJosefsen@users.noreply.github.com> --- .../zcl/data-model/chip/boolean-state-configuration-cluster.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml index 922546ab94724a..ba9f13612c06fe 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml @@ -33,7 +33,7 @@ limitations under the License. - + From b5b9ce8ee2a3b8ffe96ae318b1de2ce8842cb828 Mon Sep 17 00:00:00 2001 From: Fesseha Date: Thu, 14 Dec 2023 10:33:40 +0100 Subject: [PATCH 6/9] fixed typo, regenerate zap, added Rain Sensor device type --- .../zcl/data-model/chip/matter-devices.xml | 19 +++++++++++++++++-- .../data_model/controller-clusters.matter | 2 +- .../python/chip/clusters/Objects.py | 2 +- .../CHIP/zap-generated/MTRBaseClusters.h | 2 +- .../zap-generated/MTRDeviceTypeMetadata.mm | 1 + .../app-common/zap-generated/cluster-enums.h | 2 +- 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 7b82244d1f6cf5..429b72ca1a1dec 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -2093,7 +2093,7 @@ limitations under the License. - + @@ -2122,7 +2122,22 @@ limitations under the License. - + + + + + + MA-rain-sensor + CHIP + Matter Rain Sensor + 0x0103 + 0x0044 + Simple + Endpoint + + + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index adb6db01910ded..d19c8fe3ea0886 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4013,7 +4013,7 @@ provisional cluster BooleanStateConfiguration = 128 { } bitmap SensorFaultBitmap : bitmap16 { - kGneralFault = 0x1; + kGeneralFault = 0x1; } info event AlarmsStateChanged = 0 { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 90bff11c27cb62..8e846180cda73a 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -21533,7 +21533,7 @@ class Feature(IntFlag): kSensitivityLevel = 0x8 class SensorFaultBitmap(IntFlag): - kGneralFault = 0x1 + kGeneralFault = 0x1 class Commands: @dataclass diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index ac1bb59824203b..98f9837f29d077 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -16852,7 +16852,7 @@ typedef NS_OPTIONS(uint32_t, MTRBooleanStateConfigurationFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint16_t, MTRBooleanStateConfigurationSensorFaultBitmap) { - MTRBooleanStateConfigurationSensorFaultBitmapGneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBooleanStateConfigurationSensorFaultBitmapGeneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlValveState) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm index 2c013bba383bb3..a5c96d91f730d6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm @@ -57,6 +57,7 @@ { 0x00000041, DeviceTypeClass::Simple, "Matter Water Freeze Detector" }, { 0x00000042, DeviceTypeClass::Simple, "Matter Valve" }, { 0x00000043, DeviceTypeClass::Simple, "Matter Water Leak Detector" }, + { 0x00000044, DeviceTypeClass::Simple, "Matter Rain Sensor" }, { 0x00000070, DeviceTypeClass::Simple, "Matter Refrigerator" }, { 0x00000071, DeviceTypeClass::Simple, "Matter Temperature Controlled Cabinet" }, { 0x00000072, DeviceTypeClass::Simple, "Matter Room Air Conditioner" }, 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 213337760f80b0..4ad316f2ba3a60 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 @@ -2146,7 +2146,7 @@ enum class Feature : uint32_t // Bitmap for SensorFaultBitmap enum class SensorFaultBitmap : uint16_t { - kGneralFault = 0x1, + kGeneralFault = 0x1, }; } // namespace BooleanStateConfiguration From 498a6aefce2fd004c8e329b0d8eaa8443e7ee697 Mon Sep 17 00:00:00 2001 From: Fesseha Date: Thu, 14 Dec 2023 11:55:03 +0100 Subject: [PATCH 7/9] update missed cluster names after renaming --- .../zap-generated/chip/devicecontroller/ChipClusters.java | 5 ++--- src/controller/python/chip/clusters/__init__.py | 4 ++-- src/darwin/Framework/CHIP/templates/availability.yaml | 2 +- src/python_testing/TC_BSENCFG_2_1.py | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 99db5abbfecc9f..5f4c1939a70cb6 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -18114,10 +18114,10 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, , int minInterval, int maxInterval); } - public static class BooleanSensorConfigurationCluster extends BaseChipCluster { + public static class BooleanStateConfigurationCluster extends BaseChipCluster { public static final long CLUSTER_ID = 0x00000080L; - public BooleanSensorConfigurationCluster(long devicePtr, int endpointId) { + public BooleanStateConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } @@ -40489,4 +40489,3 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, , int minInterval, int maxInterval); } } - diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 04644cb5a4d109..1f605fd56d4274 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -25,7 +25,7 @@ from . import Attribute, CHIPClusters, Command from .Objects import (AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, - BinaryInputBasic, Binding, BooleanSensorConfiguration, BooleanState, BridgedDeviceBasicInformation, + BinaryInputBasic, Binding, BooleanStateConfiguration, BooleanState, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalMeasurement, EnergyEvse, EthernetNetworkDiagnostics, FanControl, FaultInjection, @@ -47,7 +47,7 @@ __all__ = [Attribute, CHIPClusters, Command, AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, - BinaryInputBasic, Binding, BooleanSensorConfiguration, BooleanState, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, + BinaryInputBasic, Binding, BooleanStateConfiguration, BooleanState, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalMeasurement, EnergyEvse, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 23672a12d84896..94a2b9512d4947 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -8193,7 +8193,7 @@ - MicrowaveOvenControl - MicrowaveOvenMode - DemandResponseLoadControl - - BooleanSensorConfiguration + - BooleanStateConfiguration - ValveConfigurationAndControl - Timer - OvenMode diff --git a/src/python_testing/TC_BSENCFG_2_1.py b/src/python_testing/TC_BSENCFG_2_1.py index f9a8c003d5be26..0312b131a77590 100644 --- a/src/python_testing/TC_BSENCFG_2_1.py +++ b/src/python_testing/TC_BSENCFG_2_1.py @@ -24,7 +24,7 @@ class TC_BSENCFG_2_1(MatterBaseTest): async def read_ts_attribute_expect_success(self, endpoint, attribute): - cluster = Clusters.Objects.BooleanSensorConfiguration + cluster = Clusters.Objects.BooleanStateConfiguration return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) @async_test_body @@ -33,7 +33,7 @@ async def test_TC_BSENCFG_2_1(self): endpoint = self.user_params.get("endpoint", 1) self.print_step(1, "Commissioning, already done") - attributes = Clusters.BooleanSensorConfiguration.Attributes + attributes = Clusters.BooleanStateConfiguration.Attributes self.print_step(2, "Read attribute list to determine supported attributes") attribute_list = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) @@ -41,7 +41,7 @@ async def test_TC_BSENCFG_2_1(self): self.print_step(3, "Read SensitivityLevel attribute, if supported") if attributes.SensitivityLevel.attribute_id in attribute_list: sensitivity_level_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.SensitivityLevel) - asserts.assert_less(sensitivity_level_dut, Clusters.Objects.BooleanSensorConfiguration.Enums.SensitivityEnum.kUnknownEnumValue, + asserts.assert_less(sensitivity_level_dut, Clusters.Objects.BooleanStateConfiguration.Enums.SensitivityEnum.kUnknownEnumValue, "SensitivityLevel is not in valid range") else: logging.info("Test step skipped") From b718c35fcd6d3962f3dda744d06853137bd6c528 Mon Sep 17 00:00:00 2001 From: Fesseha Date: Thu, 14 Dec 2023 12:11:58 +0100 Subject: [PATCH 8/9] rename and restyle --- src/app/zap-templates/zcl/data-model/all.xml | 2 +- src/controller/python/chip/clusters/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml index 3556c0309206e7..4eedb32f3578d9 100644 --- a/src/app/zap-templates/zcl/data-model/all.xml +++ b/src/app/zap-templates/zcl/data-model/all.xml @@ -10,8 +10,8 @@ - + diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 1f605fd56d4274..3a6099961c0463 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -25,7 +25,7 @@ from . import Attribute, CHIPClusters, Command from .Objects import (AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, - BinaryInputBasic, Binding, BooleanStateConfiguration, BooleanState, BridgedDeviceBasicInformation, + BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalMeasurement, EnergyEvse, EthernetNetworkDiagnostics, FanControl, FaultInjection, From 5540e43c3552232b000ef9b391c5d69bfbee80bd Mon Sep 17 00:00:00 2001 From: Fesseha Date: Tue, 19 Dec 2023 09:52:05 +0100 Subject: [PATCH 9/9] update domain to Gereral as per https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/8686 --- .../zcl/data-model/chip/boolean-state-configuration-cluster.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml index ba9f13612c06fe..2b5f81eed744e1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml @@ -37,8 +37,8 @@ limitations under the License. + General Boolean State Configuration - Measurement & Sensing 0x0080 BOOLEAN_STATE_CONFIGURATION_CLUSTER true