-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XMLs for valve configuration and control cluster, and boolean sensor …
…configuration cluster & device types (#29787) Co-authored-by: Boris Zbarsky <[email protected]>
- Loading branch information
Showing
64 changed files
with
55,634 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 & 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.