Skip to content

Commit

Permalink
Add washer-controls cluster xml and generate zap (#26702)
Browse files Browse the repository at this point in the history
* Adding in washer xml

* adding to cluster list

* Adding files to build.gn to fix failing tests

* Updating to CHAR_STRING

* Updating files per PR comments for string

* redoing regen after merge from master

---------

Co-authored-by: abeck-riis <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Jul 20, 2023
1 parent c4f7c18 commit 2174844
Show file tree
Hide file tree
Showing 47 changed files with 5,882 additions and 794 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.
load "../src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml";
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/washer-controls-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/chip/temperature-control-cluster.xml";
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/data-model/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<xi:include href="chip/user-label-cluster.xml" />
<xi:include href="chip/unit-localization-cluster.xml" />
<xi:include href="chip/wake-on-lan-cluster.xml" />
<xi:include href="chip/washer-controls-cluster.xml" />
<xi:include href="chip/wifi-network-diagnostics-cluster.xml" />
<xi:include href="chip/window-covering.xml" />
<xi:include href="chip/temperature-control-cluster.xml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?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="0x0053"/>
<field mask="0x01" name="Spin"/>
<field mask="0x02" name="Rinse"/>
</bitmap>

<cluster>
<domain>Appliances</domain>
<name>Washer Controls</name>
<code>0x0053</code>
<define>WASHER_CONTROLS_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine.</description>

<globalAttribute side="server" code="0xFFFD" value="1" />

<attribute side="server" code="0x0000" define="SPIN_SPEEDS" type="ARRAY" entryType="CHAR_STRING" writable="false" isNullable="false" optional="true">SpinSpeeds</attribute>
<attribute side="server" code="0x0001" define="SPIN_SPEED_CURRENT" type="INT8U" min="0x00" max="0x1F" writable="true" isNullable="true" optional="true">SpinSpeedCurrent</attribute>
<attribute side="server" code="0x0002" define="NUMBER_OF_RINSES" type="INT8U" writable="true" isNullable="true" optional="true">NumberOfRinses</attribute>
<attribute side="server" code="0x0003" define="MAXRINSES" type="INT8U" min="0x00" max="0x08" writable="false" optional="true">MaxRinses</attribute>
</cluster>
</configurator>
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"user-label-cluster.xml",
"unit-localization-cluster.xml",
"wake-on-lan-cluster.xml",
"washer-controls-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"window-covering.xml",
"matter-devices.xml",
Expand Down
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 @@ -96,6 +96,7 @@
"user-label-cluster.xml",
"unit-localization-cluster.xml",
"wake-on-lan-cluster.xml",
"washer-controls-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"window-covering.xml",
"matter-devices.xml",
Expand Down
1 change: 1 addition & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"UV_FILTER_MONITORING_CLUSTER": [],
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"WAKE_ON_LAN_CLUSTER": [],
"WASHER_CONTROLS_CLUSTER": [],
"WATER_TANK_MONITORING_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
"WINDOW_COVERING_CLUSTER": [],
Expand Down
2 changes: 2 additions & 0 deletions src/controller/data_model/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ if (current_os == "android" || matter_enable_java_compilation) {
"jni/UvFilterMonitoringClient-ReadImpl.cpp",
"jni/WakeOnLanClient-InvokeSubscribeImpl.cpp",
"jni/WakeOnLanClient-ReadImpl.cpp",
"jni/WasherControlsClient-InvokeSubscribeImpl.cpp",
"jni/WasherControlsClient-ReadImpl.cpp",
"jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/WaterTankMonitoringClient-ReadImpl.cpp",
"jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
Expand Down
19 changes: 19 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2943,6 +2943,25 @@ client cluster RefrigeratorAndTemperatureControlledCabinetModeSelect = 82 {
command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1;
}

/** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */
client cluster WasherControls = 83 {
bitmap Feature : BITMAP32 {
kSpin = 0x1;
kRinse = 0x2;
}

readonly attribute optional CHAR_STRING spinSpeeds[] = 0;
attribute optional nullable int8u spinSpeedCurrent = 1;
attribute optional nullable int8u numberOfRinses = 2;
readonly attribute optional int8u maxRinses = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** This cluster is an alias of the Mode Select cluster which also defines a namespace for the running modes of the Robotic Vacuum Cleaner devices. */
client cluster RvcRunModeSelect = 84 {
enum ModeTag : ENUM16 {
Expand Down
Loading

0 comments on commit 2174844

Please sign in to comment.