Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMLs for valve configuration and control cluster, and boolean sensor configuration cluster & device types #29787

Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
63eceaf
added first version of valve configuration and control cluster
fessehaeve Oct 16, 2023
12ec087
added first version of boolean sensor configuration cluster XML and
fessehaeve Oct 16, 2023
e73216f
fixed wrong attribute name
fessehaeve Oct 17, 2023
50a2342
fixed typo
fessehaeve Oct 17, 2023
20e2b0f
removed StartUpLevel attribute and added optional OpenDuration comman…
fessehaeve Oct 18, 2023
ac9ff6e
use allocated cluster ID
fessehaeve Oct 19, 2023
31bd8ae
added code generating bits
fessehaeve Oct 19, 2023
30d5c9e
added new device types
fessehaeve Oct 19, 2023
a83b511
Merge branch 'master' into pull-request/valve-and-boolean-clusters
fessehaeve Oct 19, 2023
3138c83
Merge branch 'master' into pull-request/valve-and-boolean-clusters
fessehaeve Oct 19, 2023
6603866
restyle
fessehaeve Oct 20, 2023
74dfee1
added BooleanSensorConfiguration and ValveConfigurationAndControl clu…
fessehaeve Oct 20, 2023
b603b9c
- fixed wrong attribute name caused by copy paste
fessehaeve Oct 20, 2023
1f4149a
regenerate all
fessehaeve Oct 20, 2023
18bbec8
added initial implementation for the new clusters
fessehaeve Oct 20, 2023
a534027
Merge remote-tracking branch 'origin/master' into pull-request/valve-…
fessehaeve Oct 20, 2023
4442188
apply provisional property to new clusters
fessehaeve Oct 21, 2023
6ceb600
fixed typo
fessehaeve Oct 27, 2023
f5c9128
removed empty implementation, removed clusters from all-clusters-app
fessehaeve Oct 27, 2023
8b2c30f
Merge remote-tracking branch 'origin/master' into pull-request/valve-…
fessehaeve Oct 27, 2023
03be7b5
fixed typo
fessehaeve Oct 30, 2023
6dbc3f1
fixed typos and regen all
fessehaeve Oct 30, 2023
f6b40e9
fixes based on PR comments
fessehaeve Nov 2, 2023
15f9e53
added descriptor cluster to valve device type
fessehaeve Nov 3, 2023
7f45be3
Merge branch 'master' into pull-request/valve-and-boolean-clusters
fessehaeve Nov 7, 2023
f4de055
Merge branch 'master' into pull-request/valve-and-boolean-clusters and
fessehaeve Nov 15, 2023
ae894c4
Merge branch 'master' into pull-request/valve-and-boolean-clusters
fessehaeve Nov 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase
{
public:
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint)
EndpointId endpoint) :
ClusterBase(exchangeManager, session, endpoint)
{}
~OtaSoftwareUpdateProviderCluster() {}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase
{
public:
OtaSoftwareUpdateProviderCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session,
EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint)
EndpointId endpoint) :
ClusterBase(exchangeManager, session, endpoint)
{}
~OtaSoftwareUpdateProviderCluster() {}
};
Expand Down
2 changes: 2 additions & 0 deletions src/app/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallba
void MatterOperationalStatePluginServerInitCallback() {}
void MatterRvcOperationalStatePluginServerInitCallback() {}
void MatterDishwasherAlarmPluginServerInitCallback() {}
void MatterBooleanSensorConfigurationPluginServerInitCallback() {}
void MatterValveConfigurationAndControlPluginServerInitCallback() {}
// ****************************************
// Print out information about each cluster
// ****************************************
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0"?>
<!--
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.
-->
<configurator>
<domain name="CHIP"/>

<bitmap name="Feature" type="bitmap32">
<cluster code="0x0080"/>
<field name="Visual" mask="0x1"/>
<field name="Audible" mask="0x2"/>
<field name="AlarmSuppress" mask="0x4"/>
<field name="SensitivityLevel" mask="0x8"/>
</bitmap>

<bitmap name="AlarmModeBitmap" type="bitmap8">
<cluster code="0x0080"/>
<field name="Visual" mask="0x1"/>
<field name="Audible" mask="0x2"/>
</bitmap>

<enum name="SensitivityEnum" type="enum8">
<cluster code="0x0080"/>
<item name="High" value="0x0"/>
<item name="Standard" value="0x1"/>
<item name="Low" value="0x2"/>
</enum>

<cluster apiMaturity="provisional">
<name>Boolean Sensor Configuration</name>
<domain>Measurement &amp; Sensing</domain>
<code>0x0080</code>
<define>BOOLEAN_SENSOR_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>

<command source="client" code="0x00" name="SuppressRequest" optional="true">
<description>This command is used to suppress the specified alarm.</description>
<arg name="AlarmsToSuppress" 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>
</event>
</cluster>
</configurator>
48 changes: 48 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,54 @@ limitations under the License.
<include cluster="Refrigerator And Temperature Controlled Cabinet Mode" client="false" server="false" clientLocked="true" serverLocked="false"></include>
</clusters>
</deviceType>
<deviceType>
<name>MA-boolean-sensor</name>
<domain>CHIP</domain>
<typeName>Matter Boolean Sensor</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>
</clusters>
</deviceType>
<deviceType>
<name>MA-valve</name>
<domain>CHIP</domain>
<typeName>Matter Valve</typeName>
<profileId editable="false">0x0103</profileId>
<deviceId editable="false">0x0042</deviceId>
<class>Simple</class>
<scope>Endpoint</scope>
<clusters lockOthers="true">
fessehaeve marked this conversation as resolved.
Show resolved Hide resolved
<include cluster="Identify" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Valve Configuration and Control" client="false" server="true" clientLocked="true" serverLocked="true"></include>
<include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true"></include>
</clusters>
</deviceType>
<deviceType>
<name>MA-water-leak-detector</name>
<domain>CHIP</domain>
<typeName>Matter Water Leak Detector</typeName>
<profileId editable="false">0x0103</profileId>
<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>
</clusters>
</deviceType>
<deviceType>
<name>MA-all-clusters-app</name>
<domain>CHIP</domain>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0"?>
<!--
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.
-->
<configurator>
<domain name="CHIP"/>

<bitmap name="Feature" type="bitmap32">
<cluster code="0x0081"/>
<field name="TimeSync" mask="0x1"/>
<field name="Level" mask="0x2"/>
</bitmap>

<bitmap name="ValveFaultBitmap" type="bitmap16">
<cluster code="0x0081"/>
<field name="GeneralFault" mask="0x1"/>
<field name="Blocked" mask="0x2"/>
<field name="Leaking" mask="0x4"/>
</bitmap>

<enum name="ValveStateEnum" type="enum8">
<cluster code="0x0081"/>
<item name="Open" value="0x0"/>
<item name="Closed" value="0x1"/>
</enum>

<cluster apiMaturity="provisional">
<name>Valve Configuration and Control</name>
<domain>HVAC</domain>
<code>0x0081</code>
<define>VALVE_CONFIGURATION_AND_CONTROL_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<description>This cluster is used to configure a valve.</description>
<globalAttribute side="either" code="0xFFFD" value="1"/>

<!-- min max definition for attribute size larger than 2 bytes is not allowed by zap codegen https://github.com/project-chip/zap/issues/1187 -->
<!-- Therefore, this check needs to be done in code. -->
<attribute side="server" code="0x0000" define="OPEN_DURATION" type="elapsed_s" isNullable="true" writable="true" optional="false">
fessehaeve marked this conversation as resolved.
Show resolved Hide resolved
fessehaeve marked this conversation as resolved.
Show resolved Hide resolved
<description>OpenDuration</description>
<access op="read" privilege="view"/>
<access op="write" privilege="manage"/>
</attribute>
<attribute side="server" code="0x0001" define="AUTO_CLOSE_TIME" type="epoch_us" isNullable="true" writable="false" optional="true">AutoCloseTime</attribute>
<attribute side="server" code="0x0002" define="REMAINING_DURATION" type="elapsed_s" isNullable="true" writable="false" optional="true">RemainingDuration</attribute>
<attribute side="server" code="0x0003" define="CURRENT_STATE" type="ValveStateEnum" isNullable="true" writable="false" optional="false">CurrentState</attribute>
<attribute side="server" code="0x0004" define="TARGET_STATE" type="ValveStateEnum" isNullable="true" writable="false" optional="false">TargetState</attribute>
<attribute side="server" code="0x0005" define="START_UP_STATE" type="ValveStateEnum" isNullable="false" writable="true" optional="true">
<description>StartUpState</description>
<access op="read" privilege="view"/>
<access op="write" privilege="manage"/>
</attribute>
<attribute side="server" code="0x0006" define="CURRENT_LEVEL" type="percent" isNullable="true" min="0" max="100" writable="false" optional="true">CurrentLevel</attribute>
<attribute side="server" code="0x0007" define="TARGET_LEVEL" type="percent" isNullable="true" min="0" max="100" writable="false" optional="true">TargetLevel</attribute>
<attribute side="server" code="0x0008" define="OPEN_LEVEL" type="percent" isNullable="true" min="1" max="100" writable="true" default="100" optional="true">
<description>OpenLevel</description>
<access op="read" privilege="view"/>
<access op="write" privilege="manage"/>
</attribute>
<attribute side="server" code="0x0009" define="VALVE_FAULT" type="ValveFaultBitmap" isNullable="false" writable="false" optional="true">ValveFault</attribute>

<command source="client" code="0x00" name="Open" optional="false">
<description>This command is used to set the valve to its fully open position.</description>
<arg name="OpenDuration" type="elapsed_s" optional="true"/>
</command>

<command source="client" code="0x01" name="Close" optional="false">
<description>This command is used to set the valve to its fully closed position.</description>
</command>

<command source="client" code="0x02" name="SetLevel" optional="true">
<description>This command is used to set the valve to a specific level.</description>
<arg name="Level" type="percent"/>
<arg name="OpenDuration" type="elapsed_s" optional="true"/>
</command>

<event side="server" code="0x00" priority="info" name="ValveStateChanged" optional="true">
<description>This event SHALL be generated when the valve changes state, either opens or closes.</description>
<field id="0" name="ValveState" type="ValveStateEnum"/>
</event>

<event side="server" code="0x01" priority="info" name="ValveFault" optional="true">
<description>This event SHALL be generated when the valve registers a fault.</description>
<field id="0" name="ValveFault" type="ValveFaultBitmap"/>
</event>
</cluster>
</configurator>
2 changes: 2 additions & 0 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"barrier-control-cluster.xml",
"basic-information-cluster.xml",
"binding-cluster.xml",
"boolean-sensor-configuration-cluster.xml",
"boolean-state-cluster.xml",
"actions-cluster.xml",
"bridged-device-basic-information.xml",
Expand Down Expand Up @@ -102,6 +103,7 @@
"time-synchronization-cluster.xml",
"user-label-cluster.xml",
"unit-localization-cluster.xml",
"valve-configuration-and-control-cluster.xml",
"wake-on-lan-cluster.xml",
"washer-controls-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"barrier-control-cluster.xml",
"basic-information-cluster.xml",
"binding-cluster.xml",
"boolean-sensor-configuration-cluster.xml",
"boolean-state-cluster.xml",
"actions-cluster.xml",
"bridged-device-basic-information.xml",
Expand Down Expand Up @@ -100,6 +101,7 @@
"time-synchronization-cluster.xml",
"user-label-cluster.xml",
"unit-localization-cluster.xml",
"valve-configuration-and-control-cluster.xml",
"wake-on-lan-cluster.xml",
"washer-controls-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
Expand Down
4 changes: 4 additions & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"BASIC_INFORMATION_CLUSTER": [],
"BINARY_INPUT_BASIC_CLUSTER": [],
"BINDING_CLUSTER": [],
"BOOLEAN_SENSOR_CONFIGURATION_CLUSTER": [],
"BOOLEAN_STATE_CLUSTER": [],
"BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [],
"CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
Expand Down Expand Up @@ -109,6 +110,7 @@
"UNIT_TESTING_CLUSTER": [],
"USER_LABEL_CLUSTER": [],
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"VALVE_CONFIGURATION_AND_CONTROL_CLUSTER": [],
"WAKE_ON_LAN_CLUSTER": [],
"LAUNDRY_WASHER_CONTROLS_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
Expand All @@ -135,6 +137,7 @@
"BASIC_INFORMATION_CLUSTER": ["basic-information"],
"BINARY_INPUT_BASIC_CLUSTER": [],
"BINDING_CLUSTER": ["bindings"],
"BOOLEAN_SENSOR_CONFIGURATION_CLUSTER": [],
"BOOLEAN_STATE_CLUSTER": [],
"BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [
"bridged-device-basic-information-server"
Expand Down Expand Up @@ -261,6 +264,7 @@
"UNIT_LOCALIZATION_CLUSTER": [],
"UNIT_TESTING_CLUSTER": ["test-cluster-server"],
"USER_LABEL_CLUSTER": ["user-label-server"],
"VALVE_CONFIGURATION_AND_CONTROL_CLUSTER": [],
"WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"],
"LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"],
Expand Down
Loading
Loading