Skip to content

Commit

Permalink
Update boolean configuration cluster XML according to latest spec (pr…
Browse files Browse the repository at this point in the history
…oject-chip#30950)

* update boolean configuration cluster according to latest spec

* rename to boolean state configuration cluster

* regen after rename to boolean state configuration

* update device type and cluster names

* fixed typo

Co-authored-by: René Josefsen <[email protected]>

* fixed typo, regenerate zap, added Rain Sensor device type

* update missed cluster names after renaming

* rename and restyle

* update domain to Gereral as per CHIP-Specifications/connectedhomeip-spec#8686

---------

Co-authored-by: René Josefsen <[email protected]>
  • Loading branch information
fessehaeve and ReneJosefsen authored Dec 19, 2023
1 parent 9ba4242 commit e49c56d
Show file tree
Hide file tree
Showing 64 changed files with 3,083 additions and 1,074 deletions.
2 changes: 1 addition & 1 deletion docs/clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion src/app/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallba
void MatterOperationalStatePluginServerInitCallback() {}
void MatterRvcOperationalStatePluginServerInitCallback() {}
void MatterDishwasherAlarmPluginServerInitCallback() {}
void MatterBooleanSensorConfigurationPluginServerInitCallback() {}
void MatterBooleanStateConfigurationPluginServerInitCallback() {}
void MatterValveConfigurationAndControlPluginServerInitCallback() {}
void MatterMicrowaveOvenModePluginServerInitCallback() {}
// ****************************************
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap-templates/zcl/data-model/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<xi:include href="chip/ballast-configuration-cluster.xml" />
<xi:include href="chip/basic-information-cluster.xml" />
<xi:include href="chip/binding-cluster.xml" />
<xi:include href="chip/boolean-sensor-configuration-cluster.xml" />
<xi:include href="chip/boolean-state-cluster.xml" />
<xi:include href="chip/boolean-state-configuration-cluster.xml" />
<xi:include href="chip/actions-cluster.xml" />
<xi:include href="chip/bridged-device-basic-information.xml" />
<xi:include href="chip/chip-ota.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,49 @@ limitations under the License.
<field name="Audible" mask="0x2"/>
</bitmap>

<enum name="SensitivityEnum" type="enum8">
<bitmap name="SensorFaultBitmap" type="bitmap16">
<cluster code="0x0080"/>
<item name="High" value="0x0"/>
<item name="Standard" value="0x1"/>
<item name="Low" value="0x2"/>
</enum>
<field name="GeneralFault" mask="0x1"/>
</bitmap>

<cluster apiMaturity="provisional">
<name>Boolean Sensor Configuration</name>
<domain>Measurement &amp; Sensing</domain>
<domain>General</domain>
<name>Boolean State Configuration</name>
<code>0x0080</code>
<define>BOOLEAN_SENSOR_CONFIGURATION_CLUSTER</define>
<define>BOOLEAN_STATE_CONFIGURATION_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<description>This cluster is used to configure a boolean sensor.</description>
<globalAttribute side="either" code="0xFFFD" value="1"/>

<attribute side="server" code="0x0000" define="SENSITIVITY_LEVEL" type="SensitivityEnum" isNullable="false" min="0" max="2" writable="true" optional="true">SensitivityLevel</attribute>
<attribute side="server" code="0x0001" define="ALARMS_ACTIVE" type="AlarmModeBitmap" isNullable="false" writable="false" optional="true">AlarmsActive</attribute>
<attribute side="server" code="0x0002" define="ALARMS_SUPPRESSED" type="AlarmModeBitmap" isNullable="false" writable="false" optional="true">AlarmsSuppressed</attribute>
<attribute side="server" code="0x0003" define="ALARMS_ENABLED" type="AlarmModeBitmap" isNullable="false" writable="true" optional="true">AlarmsEnabled</attribute>
<attribute side="server" code="0x0000" define="CURRENT_SENSITIVITY_LEVEL" type="int8u" isNullable="false" writable="true" optional="true">CurrentSensitivityLevel</attribute>
<attribute side="server" code="0x0001" define="SUPPORTED_SENSITIVITY_LEVELS" type="int8u" isNullable="false" min="2" max="10" writable="false" optional="true">SupportedSensitivityLevels</attribute>
<attribute side="server" code="0x0002" define="DEFAULT_SENSITIVITY_LEVEL" type="int8u" isNullable="false" writable="false" optional="true">DefaultSensitivityLevel</attribute>
<attribute side="server" code="0x0003" define="ALARMS_ACTIVE" type="AlarmModeBitmap" isNullable="false" writable="false" optional="true">AlarmsActive</attribute>
<attribute side="server" code="0x0004" define="ALARMS_SUPPRESSED" type="AlarmModeBitmap" isNullable="false" writable="false" optional="true">AlarmsSuppressed</attribute>
<attribute side="server" code="0x0005" define="ALARMS_ENABLED" type="AlarmModeBitmap" isNullable="false" writable="false" optional="true">AlarmsEnabled</attribute>
<attribute side="server" code="0x0006" define="ALARMS_SUPPORTED" type="AlarmModeBitmap" isNullable="false" writable="false" optional="true">AlarmsSupported</attribute>
<attribute side="server" code="0x0007" define="SENSOR_FAULT" type="SensorFaultBitmap" isNullable="false" writable="false" default="0" optional="true">SensorFault</attribute>

<command source="client" code="0x00" name="SuppressRequest" optional="true">
<description>This command is used to suppress the specified alarm.</description>
<command source="client" code="0x00" name="SuppressAlarm" optional="true">
<description>This command is used to suppress the specified alarm mode.</description>
<arg name="AlarmsToSuppress" type="AlarmModeBitmap"/>
</command>

<command source="client" code="0x01" name="EnableDisableAlarm" optional="true">
<description>This command is used to enable or disable the specified alarm mode.</description>
<arg name="AlarmsToEnableDisable" type="AlarmModeBitmap"/>
</command>

<event side="server" code="0x00" priority="info" name="AlarmsStateChanged" optional="true">
<description>This event SHALL be generated when any bits in the AlarmsActive and/or AlarmsSuppressed attributes change.</description>
<field id="0" name="AlarmsActive" type="AlarmModeBitmap"/>
<field id="1" name="AlarmsSuppressed" type="AlarmModeBitmap" optional="true"/>
</event>

<event side="server" code="0x01" priority="info" name="SensorFault" optional="true">
<description>This event SHALL be generated when the device detects a sensor fault.</description>
<description>This event SHALL be generated when the device registers or clears a fault.</description>
<field id="0" name="SensorFault" type="SensorFaultBitmap"/>
</event>
</cluster>
</configurator>
31 changes: 21 additions & 10 deletions src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2100,19 +2100,18 @@ limitations under the License.
</clusters>
</deviceType>
<deviceType>
<name>MA-boolean-sensor</name>
<name>MA-water-freeze-detector</name>
<domain>CHIP</domain>
<typeName>Matter Boolean Sensor</typeName>
<typeName>Matter Water Freeze Detector</typeName>
<profileId editable="false">0x0103</profileId>
<deviceId editable="false">0x0041</deviceId>
<class>Simple</class>
<scope>Endpoint</scope>
<clusters lockOthers="true">
<include cluster="Identify" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Boolean State" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true">
<requireAttribute>TAG_LIST</requireAttribute>
</include>
<include cluster="Boolean State Configuration" client="false" server="true" clientLocked="true" serverLocked="false"></include>
<include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true"></include>
</clusters>
</deviceType>
<deviceType>
Expand All @@ -2137,14 +2136,26 @@ limitations under the License.
<deviceId editable="false">0x0043</deviceId>
<class>Simple</class>
<scope>Endpoint</scope>
<superset>Matter Boolean Sensor</superset>
<clusters lockOthers="true">
<include cluster="Identify" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Boolean State" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Boolean Sensor Configuration" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true">
<requireAttribute>TAG_LIST</requireAttribute>
</include>
<include cluster="Boolean State Configuration" client="false" server="true" clientLocked="true" serverLocked="false"></include>
<include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true"></include>
</clusters>
</deviceType>
<deviceType>
<name>MA-rain-sensor</name>
<domain>CHIP</domain>
<typeName>Matter Rain Sensor</typeName>
<profileId editable="false">0x0103</profileId>
<deviceId editable="false">0x0044</deviceId>
<class>Simple</class>
<scope>Endpoint</scope>
<clusters lockOthers="true">
<include cluster="Identify" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Boolean State" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Boolean State Configuration" client="false" server="true" clientLocked="true" serverLocked="false"></include>
<include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true"></include>
</clusters>
</deviceType>
<deviceType>
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down Expand Up @@ -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"
],
Expand Down
37 changes: 23 additions & 14 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -4018,31 +4012,46 @@ 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;
readonly attribute attrib_id attributeList[] = 65531;
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. */
Expand Down
Loading

0 comments on commit e49c56d

Please sign in to comment.