-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added first version of valve configuration and control cluster
- Loading branch information
1 parent
d1b59df
commit 0eed6dd
Showing
1 changed file
with
123 additions
and
0 deletions.
There are no files selected for viewing
123 changes: 123 additions & 0 deletions
123
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,123 @@ | ||
<?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="0xXXXX"/> | ||
<field name="TimeSync" mask="0x1"/> | ||
<field name="Level" mask="0x2"/> | ||
</bitmap> | ||
|
||
<bitmap name="ValveFaultBitmap" type="bitmap16"> | ||
<cluster code="0xXXXX"/> | ||
<field name="GeneralFault" mask="0x1"/> | ||
<field name="Blocked" mask="0x2"/> | ||
<field name="Leak" mask="0x4"/> | ||
</bitmap> | ||
|
||
<enum name="ValveStateEnum" type="enum8"> | ||
<cluster code="0xXXXX"/> | ||
<item name="Open" value="0x0"/> | ||
<item name="Closed" value="0x1"/> | ||
</enum> | ||
|
||
<cluster> | ||
<name>Valve Configuration and Control</name> | ||
<domain>HVAC</domain> | ||
<code>0xXXXX</code> | ||
<define>VALVE_CONFIGURATION_AND_CONTROL_CLUSTER</define> | ||
<client tick="false" init="false">true</client> | ||
<server tick="false" tickFrequency="half" init="false">true</server> | ||
<description>This cluster is used to configure a valve.</description> | ||
<globalAttribute side="either" code="0xFFFD" value="1"/> | ||
|
||
<attribute side="server" code="0x0000" define="OPEN_DURATION" type="elapsed_s" isNullable="true" min="1" 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="START_UP_LEVEL" type="percent" isNullable="false" min="1" max="100" writable="true" optional="true"> | ||
<description>StartUpLevel</description> | ||
<access op="read" privilege="view"/> | ||
<access op="write" privilege="manage"/> | ||
</attribute> | ||
<attribute side="server" code="0x0009" define="OPEN_LEVEL" type="percent" isNullable="false" 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="0x000A" 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> | ||
</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"/> | ||
</command> | ||
|
||
<event side="server" code="0x00" priority="info" name="ValveStateChanged" optional="true"> | ||
<description>ValveStateChanged</description> | ||
<field id="0" name="ValveState" type="ValveStateEnum"/> | ||
</event> | ||
<event side="server" code="0x01" priority="info" name="ValveFault" optional="true"> | ||
<description>ValveFault</description> | ||
<field id="0" name="ValveFault" type="ValveFaultBitmap"/> | ||
</event> | ||
</cluster> | ||
|
||
|
||
|
||
<enum name="ControlModeEnum" type="enum8"> | ||
<cluster code="0x0200"/> | ||
<item name="ConstantSpeed" value="0x0"/> | ||
<item name="ConstantPressure" value="0x1"/> | ||
<item name="ProportionalPressure" value="0x2"/> | ||
<item name="ConstantFlow" value="0x3"/> | ||
<item name="ConstantTemperature" value="0x5"/> | ||
<item name="Automatic" value="0x7"/> | ||
</enum> | ||
|
||
<bitmap name="Feature" type="bitmap32"> | ||
<cluster code="0x0200"/> | ||
<field mask="0x01" name="ConstantPressure" /> | ||
<field mask="0x02" name="CompensatedPressure" /> | ||
<field mask="0x04" name="ConstantFlow"/> | ||
<field mask="0x08" name="ConstantSpeed"/> | ||
<field mask="0x10" name="ConstantTemperature"/> | ||
<field mask="0x20" name="Automatic"/> | ||
<field mask="0x40" name="LocalOperation"/> | ||
</bitmap> | ||
|
||
</configurator> |