Skip to content

Commit

Permalink
[cluster] Move BinaryInput and OnOffSwitchConfiguration clusters to d…
Browse files Browse the repository at this point in the history
…edicated files (#24728)
  • Loading branch information
vivien-apple authored and pull[bot] committed Nov 20, 2023
1 parent bef84c9 commit 1726562
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 38 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \
src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml \
src/app/zap-templates/zcl/data-model/silabs/general.xml \
src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \
src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/silabs/ha-devices.xml \
src/app/zap-templates/zcl/data-model/silabs/ha.xml \
src/app/zap-templates/zcl/data-model/silabs/lo-devices.xml \
Expand Down
3 changes: 3 additions & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ load "../src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";
load "../src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml";
load "../src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml";

all endpoints {
// These attributes follow a different code path and do not have to be
Expand Down
1 change: 0 additions & 1 deletion scripts/tests/chiptest/yamltest_with_chip_repl_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def _StackShutDown():

# Some still-silabs clusters
_CLUSTER_XML_DIRECTORY_PATH + '/silabs/ha.xml', # For fan control
_CLUSTER_XML_DIRECTORY_PATH + '/silabs/general.xml', # For LevelControl cluster
])

# Parsing YAML test and setting up chip-repl yamltests runner.
Expand Down
4 changes: 3 additions & 1 deletion src/app/zap-templates/zcl/data-model/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
<xi:include href="chip/wifi-network-diagnostics-cluster.xml" />
<xi:include href="chip/window-covering.xml" />
<xi:include href="chip/matter-devices.xml" />
<xi:include href="silabs/general.xml" />
<xi:include href="draft/barrier-control.xml" />
<xi:include href="draft/input-output-value-clusters.xml" />
<xi:include href="draft/onoff-switch-configuration-cluster.xml" />
<xi:include href="silabs/ha-devices.xml" />
<xi:include href="silabs/ha.xml" />
<xi:include href="silabs/lo-devices.xml" />
Expand Down
5 changes: 5 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ limitations under the License.
<configurator>
<domain name="General"/>

<bitmap name="GroupClusterFeature" type="BITMAP32">
<cluster code="0x0004"/>
<field name="GroupNames" mask="0x1"/>
</bitmap>

<cluster>
<name>Groups</name>
<domain>General</domain>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ limitations under the License.
<configurator>
<domain name="General"/>

<bitmap name="LevelControlFeature" type="BITMAP32">
<cluster code="0x0008"/>
<field name="OnOff" mask="0x1"/>
<field name="Lighting" mask="0x2"/>
<field name="Frequency" mask="0x4"/>
</bitmap>

<enum name="MoveMode" type="ENUM8">
<cluster code="0x0008"/>
<item name="Up" value="0x0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2008,2020 Silicon Labs.
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.
Expand All @@ -15,36 +15,18 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<domain name="General" spec="zcl-8.0-07-5123-08" certifiable="true">
<older spec="zcl-7.0-07-5123-07" certifiable="true"/>
<older spec="zcl6-errata-14-0129-15"/>
<older spec="zcl-6.0-15-02017-001"/>
<older spec="zcl-1.0-07-5123-03"/>
</domain>
<domain name="Lighting &amp; Occupancy" spec="l&amp;o-1.0-15-0014-04" certifiable="false"/>
<domain name="HA" spec="ha-1.2.1-05-3520-30" dependsOn="zcl-1.0-07-5123-03" certifiable="false">
<older spec="ha-1.2-05-3520-29" dependsOn="zcl-1.0-07-5123-03" certifiable="true"/>
<older spec="ha-1.1-05-3520-27" dependsOn="zcl-1.0-07-5123-03" certifiable="true"/>
</domain>
<cluster>
<name>On/off Switch Configuration</name>
<domain>General</domain>
<description>Attributes and commands for configuring On/Off switching devices.</description>
<code>0x0007</code>
<define>ON_OFF_SWITCH_CONFIGURATION_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<attribute side="server" code="0x0000" define="SWITCH_TYPE" type="ENUM8" min="0x00" max="0x01" writable="false" optional="false">switch type</attribute>
<attribute side="server" code="0x0010" define="SWITCH_ACTIONS" type="ENUM8" min="0x00" max="0x02" writable="true" default="0x00" optional="false">switch actions</attribute>
</cluster>
<domain name="General"/>

<cluster>
<name>Binary Input (Basic)</name>
<domain>General</domain>
<description>An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. </description>
<code>0x000F</code>
<define>BINARY_INPUT_BASIC_CLUSTER</define>

<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>

<attribute side="server" code="0x0004" define="ACTIVE_TEXT" type="CHAR_STRING" length="16" writable="true" default="" optional="true">active text</attribute>
<attribute side="server" code="0x001C" define="DESCRIPTION" type="CHAR_STRING" length="16" writable="true" default="" optional="true">description</attribute>
<attribute side="server" code="0x002E" define="INACTIVE_TEXT" type="CHAR_STRING" length="16" writable="true" default="" optional="true">inactive text</attribute>
Expand All @@ -55,14 +37,4 @@ limitations under the License.
<attribute side="server" code="0x006F" define="STATUS_FLAGS" type="BITMAP8" min="0x00" max="0x0F" writable="false" default="0x00" reportable="true" optional="false">status flags</attribute>
<attribute side="server" code="0x0100" define="APPLICATION_TYPE" type="INT32U" min="0x00000000" max="0xFFFFFFFF" writable="false" optional="true">application type</attribute>
</cluster>
<bitmap name="LevelControlFeature" type="BITMAP32">
<cluster code="0x0008"/>
<field name="OnOff" mask="0x1"/>
<field name="Lighting" mask="0x2"/>
<field name="Frequency" mask="0x4"/>
</bitmap>
<bitmap name="GroupClusterFeature" type="BITMAP32">
<cluster code="0x0004"/>
<field name="GroupNames" mask="0x1"/>
</bitmap>
</configurator>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?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="General"/>

<cluster>
<name>On/off Switch Configuration</name>
<domain>General</domain>
<description>Attributes and commands for configuring On/Off switching devices.</description>
<code>0x0007</code>
<define>ON_OFF_SWITCH_CONFIGURATION_CLUSTER</define>

<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>

<attribute side="server" code="0x0000" define="SWITCH_TYPE" type="ENUM8" min="0x00" max="0x01" writable="false" optional="false">switch type</attribute>
<attribute side="server" code="0x0010" define="SWITCH_ACTIONS" type="ENUM8" min="0x00" max="0x02" writable="true" default="0x00" optional="false">switch actions</attribute>
</cluster>
</configurator>
3 changes: 2 additions & 1 deletion src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"group-key-mgmt-cluster.xml",
"identify-cluster.xml",
"illuminance-measurement-cluster.xml",
"input-output-value-clusters.xml",
"keypad-input-cluster.xml",
"level-control-cluster.xml",
"localization-configuration-cluster.xml",
Expand All @@ -56,6 +57,7 @@
"mode-select-extensions.xml",
"network-commissioning-cluster.xml",
"onoff-cluster.xml",
"onoff-switch-configuration-cluster.xml",
"operational-credentials-cluster.xml",
"pressure-measurement-cluster.xml",
"power-source-cluster.xml",
Expand All @@ -82,7 +84,6 @@
"wifi-network-diagnostics-cluster.xml",
"window-covering.xml",
"matter-devices.xml",
"general.xml",
"ha-devices.xml",
"ha.xml",
"lo-devices.xml",
Expand Down
3 changes: 2 additions & 1 deletion src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"group-key-mgmt-cluster.xml",
"identify-cluster.xml",
"illuminance-measurement-cluster.xml",
"input-output-value-clusters.xml",
"keypad-input-cluster.xml",
"level-control-cluster.xml",
"localization-configuration-cluster.xml",
Expand All @@ -54,6 +55,7 @@
"mode-select-cluster.xml",
"network-commissioning-cluster.xml",
"onoff-cluster.xml",
"onoff-switch-configuration-cluster.xml",
"operational-credentials-cluster.xml",
"pressure-measurement-cluster.xml",
"power-source-cluster.xml",
Expand All @@ -80,7 +82,6 @@
"wifi-network-diagnostics-cluster.xml",
"window-covering.xml",
"matter-devices.xml",
"general.xml",
"ha-devices.xml",
"ha.xml",
"lo-devices.xml",
Expand Down

0 comments on commit 1726562

Please sign in to comment.