Skip to content

Commit

Permalink
Add Bridged Actions cluster (#10694) (#10989)
Browse files Browse the repository at this point in the history
* Add Bridged Actions Cluster

* Replace OCTET_STRING with now supported CHAR_STRING

* Remove the Bridged Actions cluster commands from the all-clusters-app

* Make some Bridge Actions cluster attributes external

* Revert setting some Bridge Actions attributes to external
  • Loading branch information
pjzander-signify authored and pull[bot] committed Dec 9, 2021
1 parent 977f23c commit 2545b65
Show file tree
Hide file tree
Showing 49 changed files with 6,310 additions and 288 deletions.
97 changes: 97 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -7957,6 +7957,103 @@
}
]
},
{
"name": "Bridged Actions",
"code": 37,
"mfgCode": null,
"define": "BRIDGED_ACTIONS_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": [
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "client",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "Bridged Actions",
"code": 37,
"mfgCode": null,
"define": "BRIDGED_ACTIONS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "action list",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "endpoint list",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "setup url",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "www.signify.com",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "Basic",
"code": 40,
Expand Down
176 changes: 176 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2021 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="CommandBits" type="BITMAP16">
<cluster code="0x0025"/>
<field mask="0x0001" name="InstantAction"/>
<field mask="0x0002" name="InstantActionWithTransition"/>
<field mask="0x0004" name="StartAction"/>
<field mask="0x0008" name="StartActionWithDuration"/>
<field mask="0x0010" name="StopAction"/>
<field mask="0x0020" name="PauseAction"/>
<field mask="0x0040" name="PauseActionWithDuration"/>
<field mask="0x0080" name="ResumeAction"/>
<field mask="0x0100" name="EnableAction"/>
<field mask="0x0200" name="EnableActionWithDuration"/>
<field mask="0x0400" name="DisableAction"/>
<field mask="0x0800" name="DisableActionWithDuration"/>
</bitmap>

<enum name="ActionErrorEnum" type="ENUM8">
<cluster code="0x0025"/>
<item value="0" name="unknown"/>
<item value="1" name="interrupted"/>
</enum>

<enum name="ActionStatusEnum" type="ENUM8">
<cluster code="0x0025"/>
<item value="0" name="Inactive"/>
<item value="1" name="Active"/>
<item value="2" name="Paused"/>
<item value="3" name="Disabled"/>
</enum>

<enum name="ActionTypeEnum" type="ENUM8">
<cluster code="0x0025"/>
<item value="0" name="other"/>
<item value="1" name="scene"/>
<item value="2" name="sequence"/>
<item value="3" name="automation"/>
<item value="4" name="exception"/>
<item value="5" name="notification"/>
<item value="6" name="alarm"/>
</enum>

<enum name="EndpointListTypeEnum" type="ENUM8">
<cluster code="0x0025"/>
<item value="0" name="other"/>
<item value="1" name="room"/>
<item value="2" name="zone"/>
</enum>

<struct name="ActionStruct">
<cluster code="0x0025"/>
<item name="ActionID" type="INT16U"/>
<item name="Name" type="CHAR_STRING" length="32"/>
<item name="Type" type="ActionTypeEnum"/>
<item name="EndpointListID" type="INT16U"/>
<item name="SupportedCommands" type="INT16U"/>
<item name="Status" type="ActionStatusEnum"/>
</struct>

<struct name="EndpointListStruct">
<cluster code="0x0025"/>
<item name="EndpointListID" type="INT16U"/>
<item name="Name" type="CHAR_STRING" length="32"/>
<item name="Type" type="EndpointListTypeEnum"/>
<!-- TODO: Change Endpoints to INT16U array once it is supported -->
<item name="Endpoints" type="OCTET_STRING" length="256"/>
</struct>

<cluster>
<domain>General</domain>
<name>Bridged Actions</name>
<code>0x0025</code>
<define>BRIDGED_ACTIONS_CLUSTER</define>
<description>This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information.</description>

<attribute side="server" code="0x0000" define="ACTION_LIST" type="ARRAY" entryType="ActionStruct" length="256" writable="false" optional="false">action list</attribute>
<attribute side="server" code="0x0001" define="ENDPOINT_LIST" type="ARRAY" entryType="EndpointListStruct" length="256" writable="false" optional="false">endpoint list</attribute>
<attribute side="server" code="0x0002" define="SETUP_URL" type="CHAR_STRING" length="512" writable="false" optional="true">setup url</attribute>

<command source="client" code="0x00" name="InstantAction" optional="true">
<description>This command triggers an action (state change) on the involved endpoints.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
</command>

<command source="client" code="0x01" name="InstantActionWithTransition" optional="true">
<description>This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
<arg name="TransitionTime" type="INT16U"/>
</command>

<command source="client" code="0x02" name="StartAction" optional="true">
<description>This command triggers the commencement of an action on the involved endpoints.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
</command>

<command source="client" code="0x03" name="StartActionWithDuration" optional="true">
<description>This command triggers the commencement of an action (with a duration) on the involved endpoints.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
<arg name="Duration" type="INT32U"/>
</command>

<command source="client" code="0x04" name="StopAction" optional="true">
<description>This command stops the ongoing action on the involved endpoints.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
</command>

<command source="client" code="0x05" name="PauseAction" optional="true">
<description>This command pauses an ongoing action.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
</command>

<command source="client" code="0x06" name="PauseActionWithDuration" optional="true">
<description>This command pauses an ongoing action with a duration.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
<arg name="Duration" type="INT32U"/>
</command>

<command source="client" code="0x07" name="ResumeAction" optional="true">
<description>This command resumes a previously paused action.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
</command>

<command source="client" code="0x08" name="EnableAction" optional="true">
<description>This command enables a certain action or automation.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
</command>

<command source="client" code="0x09" name="EnableActionWithDuration" optional="true">
<description>This command enables a certain action or automation with a duration.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
<arg name="Duration" type="INT32U"/>
</command>

<command source="client" code="0x0A" name="DisableAction" optional="true">
<description>This command disables a certain action or automation.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
</command>

<command source="client" code="0x0B" name="DisableActionWithDuration" optional="true">
<description>This command disables a certain action or automation with a duration.</description>
<arg name="ActionID" type="INT16U"/>
<arg name="InvokeID" type="INT32U" optional="true"/>
<arg name="Duration" type="INT32U"/>
</command>

</cluster>
</configurator>
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"basic-information-cluster.xml",
"binding-cluster.xml",
"boolean-state-cluster.xml",
"bridged-actions-cluster.xml",
"bridged-device-basic.xml",
"chip-devices.xml",
"chip-ota.xml",
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap_cluster_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'BINARY_INPUT_BASIC_CLUSTER': [],
'BINDING_CLUSTER': ['bindings'],
'BOOLEAN_STATE_CLUSTER': [],
'BRIDGED_ACTIONS_CLUSTER': [],
'BRIDGED_DEVICE_BASIC_CLUSTER': [],
'COLOR_CONTROL_CLUSTER': ['color-control-server'],
'COMMISSIONING_CLUSTER': [],
Expand Down Expand Up @@ -86,6 +87,7 @@
'BINARY_INPUT_BASIC_CLUSTER': [],
'BINDING_CLUSTER': [],
'BOOLEAN_STATE_CLUSTER': [],
'BRIDGED_ACTIONS_CLUSTER': [],
'BRIDGED_DEVICE_BASIC_CLUSTER': [],
'COLOR_CONTROL_CLUSTER': [],
'COMMISSIONING_CLUSTER': [],
Expand Down
Loading

0 comments on commit 2545b65

Please sign in to comment.