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/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/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/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 54%
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 44bb181f2b9d59..2b5f81eed744e1 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
@@ -31,33 +31,40 @@ limitations under the License.
-
+
-
-
-
-
+
+
- Boolean Sensor Configuration
- Measurement & Sensing
+ General
+ Boolean State Configuration
0x0080
- BOOLEAN_SENSOR_CONFIGURATION_CLUSTER
+ BOOLEAN_STATE_CONFIGURATION_CLUSTER
true
true
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/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
index fdbab080f32854..58bba4c850f9a6 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
@@ -2100,9 +2100,9 @@ limitations under the License.
- MA-boolean-sensor
+ MA-water-freeze-detector
CHIP
- Matter Boolean Sensor
+ Matter Water Freeze Detector
0x0103
0x0041
Simple
@@ -2110,9 +2110,8 @@ limitations under the License.
-
- TAG_LIST
-
+
+
@@ -2137,14 +2136,26 @@ limitations under the License.
0x0043
Simple
Endpoint
- Matter Boolean Sensor
-
-
- TAG_LIST
-
+
+
+
+
+
+ MA-rain-sensor
+ CHIP
+ Matter Rain Sensor
+ 0x0103
+ 0x0044
+ Simple
+ Endpoint
+
+
+
+
+
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 3a59d976945f68..31a334577fb4eb 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 7913f6a850c18f..565d500aeb2293 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"
],
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index ef27bd2371d0c8..f2edd0f158926a 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -3997,15 +3997,9 @@ cluster ActivatedCarbonFilterMonitoring = 114 {
}
/** This cluster is used to configure a boolean sensor. */
-provisional cluster BooleanSensorConfiguration = 128 {
+provisional cluster BooleanStateConfiguration = 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 {
+ kGeneralFault = 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 d4a978192119d9..601c14f5da66c2 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -27416,13 +27416,17 @@ 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 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;
@@ -27430,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);
}
@@ -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 79d160371f9712..4ad4fd533b207d 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,6 +2968,52 @@ public String toString() {
return output.toString();
}
}
+public static class BooleanStateConfigurationClusterSensorFaultEvent {
+ public Integer sensorFault;
+ private static final long SENSOR_FAULT_ID = 0L;
+
+ public BooleanStateConfigurationClusterSensorFaultEvent(
+ 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 BooleanStateConfigurationClusterSensorFaultEvent 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 BooleanStateConfigurationClusterSensorFaultEvent(
+ sensorFault
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("BooleanStateConfigurationClusterSensorFaultEvent {\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 cfdcfa8a6434d7..3b44c508979b8e 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,17 +8768,21 @@ 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;
}
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 91b7d28b9fe564..390cd09f42544c 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) {
@@ -19546,9 +19546,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<>());
@@ -19809,7 +19809,7 @@ public void combineCommand(Map destination, Map> getCommandMap() {
commandMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInteractionInfoMap);
- Map booleanSensorConfigurationClusterInteractionInfoMap = new LinkedHashMap<>();
+ Map booleanStateConfigurationClusterInteractionInfoMap = new LinkedHashMap<>();
- Map booleanSensorConfigurationsuppressRequestCommandParams = new LinkedHashMap();
+ Map booleanStateConfigurationsuppressAlarmCommandParams = new LinkedHashMap();
- CommandParameterInfo booleanSensorConfigurationsuppressRequestalarmsToSuppressCommandParameterInfo = new CommandParameterInfo("alarmsToSuppress", Integer.class, Integer.class);
- booleanSensorConfigurationsuppressRequestCommandParams.put("alarmsToSuppress",booleanSensorConfigurationsuppressRequestalarmsToSuppressCommandParameterInfo);
- InteractionInfo booleanSensorConfigurationsuppressRequestInteractionInfo = 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)
- .suppressRequest((DefaultClusterCallback) callback
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster)
+ .suppressAlarm((DefaultClusterCallback) callback
, (Integer)
commandArguments.get("alarmsToSuppress")
);
},
() -> new DelegatedDefaultClusterCallback(),
- booleanSensorConfigurationsuppressRequestCommandParams
+ booleanStateConfigurationsuppressAlarmCommandParams
);
- booleanSensorConfigurationClusterInteractionInfoMap.put("suppressRequest", booleanSensorConfigurationsuppressRequestInteractionInfo);
+ booleanStateConfigurationClusterInteractionInfoMap.put("suppressAlarm", booleanStateConfigurationsuppressAlarmInteractionInfo);
- commandMap.put("booleanSensorConfiguration", booleanSensorConfigurationClusterInteractionInfoMap);
+ Map booleanStateConfigurationenableDisableAlarmCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo booleanStateConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo = new CommandParameterInfo("alarmsToEnableDisable", Integer.class, Integer.class);
+ booleanStateConfigurationenableDisableAlarmCommandParams.put("alarmsToEnableDisable",booleanStateConfigurationenableDisableAlarmalarmsToEnableDisableCommandParameterInfo);
+ InteractionInfo booleanStateConfigurationenableDisableAlarmInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster)
+ .enableDisableAlarm((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("alarmsToEnableDisable")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ booleanStateConfigurationenableDisableAlarmCommandParams
+ );
+ booleanStateConfigurationClusterInteractionInfoMap.put("enableDisableAlarm", booleanStateConfigurationenableDisableAlarmInteractionInfo);
+
+ 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 ec96ce4c2bc8a7..5e36aca034a4c2 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -8637,117 +8637,161 @@ private static Map readActivatedCarbonFilterMonitoringI
return result;
}
- private static Map readBooleanSensorConfigurationInteractionInfo() {
- Map result = new LinkedHashMap<>();Map readBooleanSensorConfigurationSensitivityLevelCommandParams = new LinkedHashMap();
- InteractionInfo readBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo = new InteractionInfo(
+ private static Map readBooleanStateConfigurationInteractionInfo() {
+ Map result = new LinkedHashMap<>();Map readBooleanStateConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
- ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readSensitivityLevelAttribute(
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readCurrentSensitivityLevelAttribute(
(ChipClusters.IntegerAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
- readBooleanSensorConfigurationSensitivityLevelCommandParams
+ readBooleanStateConfigurationCurrentSensitivityLevelCommandParams
);
- result.put("readSensitivityLevelAttribute", readBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo);
- Map readBooleanSensorConfigurationAlarmsActiveCommandParams = new LinkedHashMap();
- InteractionInfo readBooleanSensorConfigurationAlarmsActiveAttributeInteractionInfo = new InteractionInfo(
+ result.put("readCurrentSensitivityLevelAttribute", readBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo);
+ Map readBooleanStateConfigurationSupportedSensitivityLevelsCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationSupportedSensitivityLevelsAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
- ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsActiveAttribute(
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readSupportedSensitivityLevelsAttribute(
(ChipClusters.IntegerAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
- readBooleanSensorConfigurationAlarmsActiveCommandParams
+ readBooleanStateConfigurationSupportedSensitivityLevelsCommandParams
);
- result.put("readAlarmsActiveAttribute", readBooleanSensorConfigurationAlarmsActiveAttributeInteractionInfo);
- Map readBooleanSensorConfigurationAlarmsSuppressedCommandParams = new LinkedHashMap();
- InteractionInfo readBooleanSensorConfigurationAlarmsSuppressedAttributeInteractionInfo = new InteractionInfo(
+ result.put("readSupportedSensitivityLevelsAttribute", readBooleanStateConfigurationSupportedSensitivityLevelsAttributeInteractionInfo);
+ Map readBooleanStateConfigurationDefaultSensitivityLevelCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationDefaultSensitivityLevelAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
- ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsSuppressedAttribute(
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readDefaultSensitivityLevelAttribute(
(ChipClusters.IntegerAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
- readBooleanSensorConfigurationAlarmsSuppressedCommandParams
+ readBooleanStateConfigurationDefaultSensitivityLevelCommandParams
);
- result.put("readAlarmsSuppressedAttribute", readBooleanSensorConfigurationAlarmsSuppressedAttributeInteractionInfo);
- Map readBooleanSensorConfigurationAlarmsEnabledCommandParams = new LinkedHashMap();
- InteractionInfo readBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo(
+ result.put("readDefaultSensitivityLevelAttribute", readBooleanStateConfigurationDefaultSensitivityLevelAttributeInteractionInfo);
+ Map readBooleanStateConfigurationAlarmsActiveCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationAlarmsActiveAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
- ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsEnabledAttribute(
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsActiveAttribute(
(ChipClusters.IntegerAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
- readBooleanSensorConfigurationAlarmsEnabledCommandParams
+ readBooleanStateConfigurationAlarmsActiveCommandParams
);
- result.put("readAlarmsEnabledAttribute", readBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo);
- Map readBooleanSensorConfigurationGeneratedCommandListCommandParams = new LinkedHashMap();
- InteractionInfo readBooleanSensorConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ result.put("readAlarmsActiveAttribute", readBooleanStateConfigurationAlarmsActiveAttributeInteractionInfo);
+ Map readBooleanStateConfigurationAlarmsSuppressedCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationAlarmsSuppressedAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
- ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readGeneratedCommandListAttribute(
- (ChipClusters.BooleanSensorConfigurationCluster.GeneratedCommandListAttributeCallback) callback
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsSuppressedAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readBooleanStateConfigurationAlarmsSuppressedCommandParams
+ );
+ result.put("readAlarmsSuppressedAttribute", readBooleanStateConfigurationAlarmsSuppressedAttributeInteractionInfo);
+ Map readBooleanStateConfigurationAlarmsEnabledCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsEnabledAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readBooleanStateConfigurationAlarmsEnabledCommandParams
+ );
+ result.put("readAlarmsEnabledAttribute", readBooleanStateConfigurationAlarmsEnabledAttributeInteractionInfo);
+ Map readBooleanStateConfigurationAlarmsSupportedCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationAlarmsSupportedAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readAlarmsSupportedAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readBooleanStateConfigurationAlarmsSupportedCommandParams
+ );
+ result.put("readAlarmsSupportedAttribute", readBooleanStateConfigurationAlarmsSupportedAttributeInteractionInfo);
+ Map readBooleanStateConfigurationSensorFaultCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationSensorFaultAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).readSensorFaultAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readBooleanStateConfigurationSensorFaultCommandParams
+ );
+ result.put("readSensorFaultAttribute", readBooleanStateConfigurationSensorFaultAttributeInteractionInfo);
+ Map readBooleanStateConfigurationGeneratedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readBooleanStateConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((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;
}
@@ -19460,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 5c6174336ce03a..3db35dfd2b3970 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -1164,52 +1164,30 @@ public Map> getWriteAttributeMap() {
);
writeActivatedCarbonFilterMonitoringInteractionInfo.put("writeLastChangedTimeAttribute", writeActivatedCarbonFilterMonitoringLastChangedTimeAttributeInteractionInfo);
writeAttributeMap.put("activatedCarbonFilterMonitoring", writeActivatedCarbonFilterMonitoringInteractionInfo);
- Map writeBooleanSensorConfigurationInteractionInfo = new LinkedHashMap<>();
- Map writeBooleanSensorConfigurationSensitivityLevelCommandParams = new LinkedHashMap();
- CommandParameterInfo booleanSensorConfigurationsensitivityLevelCommandParameterInfo =
+ Map writeBooleanStateConfigurationInteractionInfo = new LinkedHashMap<>();
+ Map writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams = new LinkedHashMap();
+ CommandParameterInfo booleanStateConfigurationcurrentSensitivityLevelCommandParameterInfo =
new CommandParameterInfo(
"value",
Integer.class,
Integer.class
);
- writeBooleanSensorConfigurationSensitivityLevelCommandParams.put(
+ writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams.put(
"value",
- booleanSensorConfigurationsensitivityLevelCommandParameterInfo
+ booleanStateConfigurationcurrentSensitivityLevelCommandParameterInfo
);
- InteractionInfo writeBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo = new InteractionInfo(
+ InteractionInfo writeBooleanStateConfigurationCurrentSensitivityLevelAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
- ((ChipClusters.BooleanSensorConfigurationCluster) cluster).writeSensitivityLevelAttribute(
+ ((ChipClusters.BooleanStateConfigurationCluster) cluster).writeCurrentSensitivityLevelAttribute(
(DefaultClusterCallback) callback,
(Integer) commandArguments.get("value")
);
},
() -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(),
- writeBooleanSensorConfigurationSensitivityLevelCommandParams
+ writeBooleanStateConfigurationCurrentSensitivityLevelCommandParams
);
- 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);
- 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/BooleanStateConfigurationClusterSensorFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt
new file mode 100644
index 00000000000000..6232f56300e520
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.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 BooleanStateConfigurationClusterSensorFaultEvent(val sensorFault: UInt) {
+ override fun toString(): String = buildString {
+ append("BooleanStateConfigurationClusterSensorFaultEvent {\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
+ ): BooleanStateConfigurationClusterSensorFaultEvent {
+ tlvReader.enterStructure(tlvTag)
+ val sensorFault = tlvReader.getUInt(ContextSpecificTag(TAG_SENSOR_FAULT))
+
+ tlvReader.exitContainer()
+
+ 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 6180ecae906183..363e418f960f6d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -131,8 +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/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/controller/cluster/clusters/BooleanSensorConfigurationCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateConfigurationCluster.kt
similarity index 72%
rename from src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanSensorConfigurationCluster.kt
rename to src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateConfigurationCluster.kt
index 510d0c3e4f3db4..3cbd118dac1c2e 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanSensorConfigurationCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateConfigurationCluster.kt
@@ -43,7 +43,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
) {
@@ -87,7 +87,7 @@ class BooleanSensorConfigurationCluster(
object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
}
- suspend fun suppressRequest(alarmsToSuppress: UByte, timedInvokeTimeout: Duration? = null) {
+ suspend fun suppressAlarm(alarmsToSuppress: UByte, timedInvokeTimeout: Duration? = null) {
val commandId: UInt = 0u
val tlvWriter = TlvWriter()
@@ -108,7 +108,31 @@ class BooleanSensorConfigurationCluster(
logger.log(Level.FINE, "Invoke command succeeded: ${response}")
}
- suspend fun readSensitivityLevelAttribute(): UByte? {
+ suspend fun enableDisableAlarm(
+ alarmsToEnableDisable: UByte,
+ timedInvokeTimeout: Duration? = null
+ ) {
+ val commandId: UInt = 1u
+
+ 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 = timedInvokeTimeout
+ )
+
+ 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 =
@@ -130,7 +154,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)
@@ -144,7 +168,10 @@ class BooleanSensorConfigurationCluster(
return decodedValue
}
- suspend fun writeSensitivityLevelAttribute(value: UByte, timedWriteTimeout: Duration? = null) {
+ suspend fun writeCurrentSensitivityLevelAttribute(
+ value: UByte,
+ timedWriteTimeout: Duration? = null
+ ) {
val ATTRIBUTE_ID: UInt = 0u
val tlvWriter = TlvWriter()
@@ -184,7 +211,7 @@ class BooleanSensorConfigurationCluster(
}
}
- suspend fun subscribeSensitivityLevelAttribute(
+ suspend fun subscribeCurrentSensitivityLevelAttribute(
minInterval: Int,
maxInterval: Int
): Flow {
@@ -220,7 +247,7 @@ class BooleanSensorConfigurationCluster(
.firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
requireNotNull(attributeData) {
- "Sensitivitylevel attribute not found in Node State update"
+ "Currentsensitivitylevel attribute not found in Node State update"
}
// Decode the TLV data into the appropriate type
@@ -241,7 +268,7 @@ class BooleanSensorConfigurationCluster(
}
}
- suspend fun readAlarmsActiveAttribute(): UByte? {
+ suspend fun readSupportedSensitivityLevelsAttribute(): UByte? {
val ATTRIBUTE_ID: UInt = 1u
val attributePath =
@@ -263,7 +290,7 @@ class BooleanSensorConfigurationCluster(
it.path.attributeId == ATTRIBUTE_ID
}
- requireNotNull(attributeData) { "Alarmsactive attribute not found in response" }
+ requireNotNull(attributeData) { "Supportedsensitivitylevels attribute not found in response" }
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
@@ -277,7 +304,7 @@ class BooleanSensorConfigurationCluster(
return decodedValue
}
- suspend fun subscribeAlarmsActiveAttribute(
+ suspend fun subscribeSupportedSensitivityLevelsAttribute(
minInterval: Int,
maxInterval: Int
): Flow {
@@ -312,7 +339,9 @@ class BooleanSensorConfigurationCluster(
.filterIsInstance()
.firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
- requireNotNull(attributeData) { "Alarmsactive attribute not found in Node State update" }
+ requireNotNull(attributeData) {
+ "Supportedsensitivitylevels attribute not found in Node State update"
+ }
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
@@ -332,7 +361,7 @@ class BooleanSensorConfigurationCluster(
}
}
- suspend fun readAlarmsSuppressedAttribute(): UByte? {
+ suspend fun readDefaultSensitivityLevelAttribute(): UByte? {
val ATTRIBUTE_ID: UInt = 2u
val attributePath =
@@ -354,7 +383,7 @@ class BooleanSensorConfigurationCluster(
it.path.attributeId == ATTRIBUTE_ID
}
- requireNotNull(attributeData) { "Alarmssuppressed attribute not found in response" }
+ requireNotNull(attributeData) { "Defaultsensitivitylevel attribute not found in response" }
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
@@ -368,7 +397,7 @@ class BooleanSensorConfigurationCluster(
return decodedValue
}
- suspend fun subscribeAlarmsSuppressedAttribute(
+ suspend fun subscribeDefaultSensitivityLevelAttribute(
minInterval: Int,
maxInterval: Int
): Flow {
@@ -404,7 +433,7 @@ class BooleanSensorConfigurationCluster(
.firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
requireNotNull(attributeData) {
- "Alarmssuppressed attribute not found in Node State update"
+ "Defaultsensitivitylevel attribute not found in Node State update"
}
// Decode the TLV data into the appropriate type
@@ -425,7 +454,7 @@ class BooleanSensorConfigurationCluster(
}
}
- suspend fun readAlarmsEnabledAttribute(): UByte? {
+ suspend fun readAlarmsActiveAttribute(): UByte? {
val ATTRIBUTE_ID: UInt = 3u
val attributePath =
@@ -447,7 +476,7 @@ class BooleanSensorConfigurationCluster(
it.path.attributeId == ATTRIBUTE_ID
}
- requireNotNull(attributeData) { "Alarmsenabled attribute not found in response" }
+ requireNotNull(attributeData) { "Alarmsactive attribute not found in response" }
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
@@ -461,51 +490,195 @@ class BooleanSensorConfigurationCluster(
return decodedValue
}
- suspend fun writeAlarmsEnabledAttribute(value: UByte, timedWriteTimeout: Duration? = null) {
+ suspend fun subscribeAlarmsActiveAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
val ATTRIBUTE_ID: UInt = 3u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
- val tlvWriter = TlvWriter()
- tlvWriter.put(AnonymousTag, value)
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
- val writeRequests: WriteRequests =
- WriteRequests(
- requests =
- listOf(
- WriteRequest(
- attributePath =
- AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID),
- tlvPayload = tlvWriter.getEncoded()
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
)
- ),
- timedRequest = timedWriteTimeout
- )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
- val response: WriteResponse = controller.write(writeRequests)
+ requireNotNull(attributeData) { "Alarmsactive attribute not found in Node State update" }
- when (response) {
- is WriteResponse.Success -> {
- logger.log(Level.FINE, "Write command succeeded")
+ // 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
+ }
+
+ decodedValue?.let { emit(UByteSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
}
- 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}")
+ suspend fun readAlarmsSuppressedAttribute(): UByte? {
+ val ATTRIBUTE_ID: UInt = 4u
+
+ 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) { "Alarmssuppressed 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 subscribeAlarmsSuppressedAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 4u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
}
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
- throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage")
+ requireNotNull(attributeData) {
+ "Alarmssuppressed attribute not found in Node State update"
+ }
+
+ // 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
+ }
+
+ decodedValue?.let { emit(UByteSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
}
}
}
+ suspend fun readAlarmsEnabledAttribute(): UByte? {
+ val ATTRIBUTE_ID: UInt = 5u
+
+ 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) { "Alarmsenabled 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 subscribeAlarmsEnabledAttribute(
minInterval: Int,
maxInterval: Int
): Flow {
- val ATTRIBUTE_ID: UInt = 3u
+ val ATTRIBUTE_ID: UInt = 5u
val attributePaths =
listOf(
AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
@@ -556,6 +729,190 @@ class BooleanSensorConfigurationCluster(
}
}
+ suspend fun readAlarmsSupportedAttribute(): UByte? {
+ val ATTRIBUTE_ID: UInt = 6u
+
+ 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) { "Alarmssupported 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 subscribeAlarmsSupportedAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 6u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Alarmssupported attribute not found in Node State update"
+ }
+
+ // 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
+ }
+
+ decodedValue?.let { emit(UByteSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ 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 subscribeSensorFaultAttribute(
+ minInterval: Int,
+ maxInterval: Int
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 7u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong())
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Sensorfault attribute not found in Node State update" }
+
+ // 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
+ }
+
+ decodedValue?.let { emit(UShortSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
val ATTRIBUTE_ID: UInt = 65528u
@@ -1105,7 +1462,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/controller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt
similarity index 86%
rename from src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt
rename to src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt
index 3918c2c126485e..f6777c819c9a57 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt
+++ b/src/controller/java/generated/java/matter/controller/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/controller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt
new file mode 100644
index 00000000000000..d29696d04cc3bf
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.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.controller.cluster.eventstructs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class BooleanStateConfigurationClusterSensorFaultEvent(val sensorFault: UShort) {
+ override fun toString(): String = buildString {
+ append("BooleanStateConfigurationClusterSensorFaultEvent {\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
+ ): BooleanStateConfigurationClusterSensorFaultEvent {
+ tlvReader.enterStructure(tlvTag)
+ val sensorFault = tlvReader.getUShort(ContextSpecificTag(TAG_SENSOR_FAULT))
+
+ tlvReader.exitContainer()
+
+ return BooleanStateConfigurationClusterSensorFaultEvent(sensorFault)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index d7d18479992e91..ff107deb40dcbb 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -131,8 +131,9 @@ matter_eventstructs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt",
- "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt",
@@ -212,8 +213,8 @@ matter_clusters_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BasicInformationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BinaryInputBasicCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BindingCluster.kt",
- "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanSensorConfigurationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateConfigurationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt",
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index b1764fa2e9a1be..5fba45d25734e3 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -18781,12 +18781,44 @@ 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::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/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 c8b407678f3d20..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, writeSensitivityLevelAttribute)
+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::SensitivityLevel::TypeInfo;
+ using TypeInfo = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo;
TypeInfo::Type cppValue;
std::vector> cleanupByteArrays;
@@ -3314,60 +3314,8 @@ JNI_METHOD(void, BooleanSensorConfigurationCluster, writeSensitivityLevelAttribu
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, 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);
+ 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 6e3b2093ead51c..997cccac866bde 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;
}
@@ -3730,23 +3730,31 @@ 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",
+ 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, "", "()V");
+ 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;
}
- jobject value = env->NewObject(sensorFaultStructClass, sensorFaultStructCtor);
+ jobject value = env->NewObject(sensorFaultStructClass, sensorFaultStructCtor, value_sensorFault);
return value;
}
diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp
index e7d797ce9f0e92..f2c06db10fea72 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/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/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index e6a384cd3336a9..08ff2ab1b8d93a 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -6135,44 +6135,74 @@ class ChipClusters:
},
},
}
- _BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_INFO = {
- "clusterName": "BooleanSensorConfiguration",
+ _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO = {
+ "clusterName": "BooleanStateConfiguration",
"clusterId": 0x00000080,
"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",
@@ -13836,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,
@@ -13951,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 5fd82a3382a339..4e103ede217200 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -21483,17 +21483,21 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
@dataclass
-class BooleanSensorConfiguration(Cluster):
+class BooleanStateConfiguration(Cluster):
id: typing.ClassVar[int] = 0x00000080
@ChipUtility.classproperty
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):
+ kGeneralFault = 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/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py
index 04644cb5a4d109..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, BooleanSensorConfiguration, BooleanState, BridgedDeviceBasicInformation,
+ BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, 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 2558acd871a30e..935a3889eea738 100644
--- a/src/darwin/Framework/CHIP/templates/availability.yaml
+++ b/src/darwin/Framework/CHIP/templates/availability.yaml
@@ -8249,7 +8249,7 @@
- MicrowaveOvenControl
- MicrowaveOvenMode
- DemandResponseLoadControl
- - BooleanSensorConfiguration
+ - BooleanStateConfiguration
- ValveConfigurationAndControl
- Timer
- OvenMode
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index 1f7d91156734b9..d579533e2eb296 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -2819,11 +2819,17 @@ 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::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;
}
@@ -6342,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 25d41e9c8bf966..5910c74a60e412 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -7381,19 +7381,41 @@ 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::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;
}
@@ -17904,8 +17948,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 0bfb44111478a2..23f78925c5f2e1 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -6985,27 +6985,45 @@ 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 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:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command EnableDisableAlarm
+ *
+ * This command is used to enable or disable the specified alarm mode.
+ */
+- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)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
@@ -7068,7 +7096,7 @@ MTR_PROVISIONALLY_AVAILABLE
@end
-@interface MTRBaseClusterBooleanSensorConfiguration (Availability)
+@interface MTRBaseClusterBooleanStateConfiguration (Availability)
/**
* For all instance methods (reads, writes, commands) that take a completion,
@@ -16811,22 +16839,20 @@ 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,
+typedef NS_OPTIONS(uint8_t, MTRBooleanStateConfigurationAlarmModeBitmap) {
+ MTRBooleanStateConfigurationAlarmModeBitmapVisual MTR_PROVISIONALLY_AVAILABLE = 0x1,
+ MTRBooleanStateConfigurationAlarmModeBitmapAudible MTR_PROVISIONALLY_AVAILABLE = 0x2,
} MTR_PROVISIONALLY_AVAILABLE;
-typedef NS_OPTIONS(uint8_t, MTRBooleanSensorConfigurationAlarmModeBitmap) {
- MTRBooleanSensorConfigurationAlarmModeBitmapVisual MTR_PROVISIONALLY_AVAILABLE = 0x1,
- MTRBooleanSensorConfigurationAlarmModeBitmapAudible MTR_PROVISIONALLY_AVAILABLE = 0x2,
+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(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(uint16_t, MTRBooleanStateConfigurationSensorFaultBitmap) {
+ MTRBooleanStateConfigurationSensorFaultBitmapGeneralFault 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 45c8b38f7a85dc..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)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params completion:(MTRStatusCompletion)completion
+- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion
{
if (params == nil) {
- params = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams
+ params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams
alloc] init];
}
@@ -49097,7 +49097,31 @@ - (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressR
auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
- using RequestType = BooleanSensorConfiguration::Commands::SuppressRequest::Type;
+ using RequestType = BooleanStateConfiguration::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:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo;
[clusterStateCacheContainer
_readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
clusterID:TypeInfo::GetClusterId()
@@ -49175,7 +49271,7 @@ + (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCache
- (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())
@@ -49188,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())
@@ -49200,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()
@@ -49211,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())
@@ -49224,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())
@@ -49236,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()
@@ -49247,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())
@@ -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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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 = BooleanStateConfiguration::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::AlarmsEnabled::TypeInfo;
+ using TypeInfo = BooleanStateConfiguration::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 = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo;
[clusterStateCacheContainer
_readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
clusterID:TypeInfo::GetClusterId()
@@ -49311,7 +49451,7 @@ + (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheCon
- (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())
@@ -49324,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())
@@ -49336,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()
@@ -49347,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())
@@ -49360,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())
@@ -49372,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()
@@ -49383,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())
@@ -49396,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())
@@ -49408,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()
@@ -49419,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())
@@ -49432,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())
@@ -49444,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()
@@ -49455,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())
@@ -49468,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())
@@ -49480,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()
@@ -49491,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())
@@ -49504,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())
@@ -49516,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 82c2cbc34bc9f5..0ed485f03948a7 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,17 +2576,21 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) {
MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
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,
- 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,
@@ -6246,8 +6250,9 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) {
// Cluster ActivatedCarbonFilterMonitoring commands
MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
- // Cluster BooleanSensorConfiguration commands
- MTRCommandIDTypeClusterBooleanSensorConfigurationCommandSuppressRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ // Cluster BooleanStateConfiguration commands
+ MTRCommandIDTypeClusterBooleanStateConfigurationCommandSuppressAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRCommandIDTypeClusterBooleanStateConfigurationCommandEnableDisableAlarmID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
// Cluster ValveConfigurationAndControl commands
MTRCommandIDTypeClusterValveConfigurationAndControlCommandOpenID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
@@ -7144,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 1b16379ce6eb58..287407184597ce 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -3311,25 +3311,32 @@ 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)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)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)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;
@@ -3348,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 fbf736a5882e3e..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)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)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 = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams
+ params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams
alloc] init];
}
@@ -8963,7 +8963,7 @@ - (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressR
auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
- using RequestType = BooleanSensorConfiguration::Commands::SuppressRequest::Type;
+ using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type;
[self.device _invokeKnownCommandWithEndpointID:@(self.endpoint)
clusterID:@(RequestType::GetClusterId())
commandID:@(RequestType::GetCommandId())
@@ -8977,76 +8977,112 @@ - (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressR
completion:responseHandler];
}
-- (NSDictionary * _Nullable)readAttributeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params
+- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)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 = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = BooleanStateConfiguration::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:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID) 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:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeCurrentSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout];
+}
+
+- (NSDictionary * _Nullable)readAttributeSupportedSensitivityLevelsWithParams:(MTRReadParams * _Nullable)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:@(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];
}
-- (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:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAlarmsSupportedID) 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:@(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 cfb637526a9025..e01bdabcb6a987 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 MTRBooleanStateConfigurationClusterSuppressAlarmParams : 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 MTRBooleanStateConfigurationClusterEnableDisableAlarmParams : 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 5d47571ec5ad3e..7e7eccfb8043ca 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 MTRBooleanStateConfigurationClusterSuppressAlarmParams
- (instancetype)init
{
if (self = [super init]) {
@@ -15396,7 +15396,7 @@ - (instancetype)init
- (id)copyWithZone:(NSZone * _Nullable)zone;
{
- auto other = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams alloc] init];
+ auto other = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init];
other.alarmsToSuppress = self.alarmsToSuppress;
other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
@@ -15413,11 +15413,11 @@ - (NSString *)description
@end
-@implementation MTRBooleanSensorConfigurationClusterSuppressRequestParams (InternalMethods)
+@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods)
- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
{
- chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Type encodableStruct;
+ chip::app::Clusters::BooleanStateConfiguration::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 MTRBooleanStateConfigurationClusterEnableDisableAlarmParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _alarmsToEnableDisable = @(0);
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams 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 MTRBooleanStateConfigurationClusterEnableDisableAlarmParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::BooleanStateConfiguration::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..f5738ad6af5b1b 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 MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods)
+
+- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@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/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
index 6d287e47b2fd58..20b8ec3138d5da 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
@@ -54,9 +54,10 @@
{ 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" },
+ { 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/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
index fdffaae3ca3761..b8d26c67791e00 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,13 @@ static id _Nullable DecodeEventPayloadForBooleanSensorConfigurationCluster(Event
return nil;
}
- __auto_type * value = [MTRBooleanSensorConfigurationClusterSensorFaultEvent new];
+ __auto_type * value = [MTRBooleanStateConfigurationClusterSensorFaultEvent new];
+
+ do {
+ NSNumber * _Nonnull memberValue;
+ memberValue = [NSNumber numberWithUnsignedShort:cppValue.sensorFault.Raw()];
+ value.sensorFault = memberValue;
+ } while (0);
return value;
}
@@ -4449,8 +4455,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 8a1ba6e5fd330b..f879cf7be69982 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -1053,13 +1053,14 @@ 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
MTR_PROVISIONALLY_AVAILABLE
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index 4c08c7228fd870..12aa87d41c1c4e 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,24 +4233,28 @@ - (NSString *)description
@end
-@implementation MTRBooleanSensorConfigurationClusterSensorFaultEvent
+@implementation MTRBooleanStateConfigurationClusterSensorFaultEvent
- (instancetype)init
{
if (self = [super init]) {
+
+ _sensorFault = @(0);
}
return self;
}
- (id)copyWithZone:(NSZone * _Nullable)zone
{
- auto other = [[MTRBooleanSensorConfigurationClusterSensorFaultEvent alloc] init];
+ auto other = [[MTRBooleanStateConfigurationClusterSensorFaultEvent 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/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")
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 77c7512374fa94..d2f762fd845a6c 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
@@ -9282,17 +9282,79 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value)
} // namespace Attributes
} // namespace ActivatedCarbonFilterMonitoring
-namespace BooleanSensorConfiguration {
+namespace BooleanStateConfiguration {
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::BooleanStateConfiguration::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::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+}
+
+} // namespace CurrentSensitivityLevel
+
+namespace SupportedSensitivityLevels {
+
+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::BooleanStateConfiguration::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::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
+}
+
+} // namespace SupportedSensitivityLevels
+
+namespace DefaultSensitivityLevel {
+
+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));
+ EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp));
VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
{
@@ -9301,9 +9363,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;
@@ -9311,20 +9373,19 @@ 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::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
}
-} // namespace SensitivityLevel
+} // namespace DefaultSensitivityLevel
namespace AlarmsActive {
-EmberAfStatus Get(chip::EndpointId endpoint,
- chip::BitMask