Skip to content

Commit 937bc45

Browse files
abeck-whirlpoolabeck-riisandy31415
authored
Add washer-controls cluster xml and generate zap (project-chip#26702)
* 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 <98488327+abeck-riis@users.noreply.github.com> Co-authored-by: Andrei Litvin <andy314@gmail.com>
1 parent 2cf5b57 commit 937bc45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+5882
-794
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ jobs:
194194
src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \
195195
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
196196
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
197+
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
197198
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
198199
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
199200
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.
7676
load "../src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml";
7777
load "../src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml";
7878
load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
79+
load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml";
7980
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
8081
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";
8182
load "../src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml";

src/app/zap-templates/zcl/data-model/all.xml

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<xi:include href="chip/user-label-cluster.xml" />
8080
<xi:include href="chip/unit-localization-cluster.xml" />
8181
<xi:include href="chip/wake-on-lan-cluster.xml" />
82+
<xi:include href="chip/washer-controls-cluster.xml" />
8283
<xi:include href="chip/wifi-network-diagnostics-cluster.xml" />
8384
<xi:include href="chip/window-covering.xml" />
8485
<xi:include href="chip/temperature-control-cluster.xml" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2023 Project CHIP Authors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<configurator>
18+
<domain name="CHIP"/>
19+
20+
<bitmap name="Feature" type="BITMAP32">
21+
<cluster code="0x0053"/>
22+
<field mask="0x01" name="Spin"/>
23+
<field mask="0x02" name="Rinse"/>
24+
</bitmap>
25+
26+
<cluster>
27+
<domain>Appliances</domain>
28+
<name>Washer Controls</name>
29+
<code>0x0053</code>
30+
<define>WASHER_CONTROLS_CLUSTER</define>
31+
<client init="false" tick="false">true</client>
32+
<server init="false" tick="false">true</server>
33+
<description>This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine.</description>
34+
35+
<globalAttribute side="server" code="0xFFFD" value="1" />
36+
37+
<attribute side="server" code="0x0000" define="SPIN_SPEEDS" type="ARRAY" entryType="CHAR_STRING" writable="false" isNullable="false" optional="true">SpinSpeeds</attribute>
38+
<attribute side="server" code="0x0001" define="SPIN_SPEED_CURRENT" type="INT8U" min="0x00" max="0x1F" writable="true" isNullable="true" optional="true">SpinSpeedCurrent</attribute>
39+
<attribute side="server" code="0x0002" define="NUMBER_OF_RINSES" type="INT8U" writable="true" isNullable="true" optional="true">NumberOfRinses</attribute>
40+
<attribute side="server" code="0x0003" define="MAXRINSES" type="INT8U" min="0x00" max="0x08" writable="false" optional="true">MaxRinses</attribute>
41+
</cluster>
42+
</configurator>

src/app/zap-templates/zcl/zcl-with-test-extensions.json

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"user-label-cluster.xml",
9999
"unit-localization-cluster.xml",
100100
"wake-on-lan-cluster.xml",
101+
"washer-controls-cluster.xml",
101102
"wifi-network-diagnostics-cluster.xml",
102103
"window-covering.xml",
103104
"matter-devices.xml",

src/app/zap-templates/zcl/zcl.json

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"user-label-cluster.xml",
9797
"unit-localization-cluster.xml",
9898
"wake-on-lan-cluster.xml",
99+
"washer-controls-cluster.xml",
99100
"wifi-network-diagnostics-cluster.xml",
100101
"window-covering.xml",
101102
"matter-devices.xml",

src/app/zap_cluster_list.json

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
"UV_FILTER_MONITORING_CLUSTER": [],
140140
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [],
141141
"WAKE_ON_LAN_CLUSTER": [],
142+
"WASHER_CONTROLS_CLUSTER": [],
142143
"WATER_TANK_MONITORING_CLUSTER": [],
143144
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
144145
"WINDOW_COVERING_CLUSTER": [],

src/controller/data_model/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ if (current_os == "android" || matter_enable_java_compilation) {
296296
"jni/UvFilterMonitoringClient-ReadImpl.cpp",
297297
"jni/WakeOnLanClient-InvokeSubscribeImpl.cpp",
298298
"jni/WakeOnLanClient-ReadImpl.cpp",
299+
"jni/WasherControlsClient-InvokeSubscribeImpl.cpp",
300+
"jni/WasherControlsClient-ReadImpl.cpp",
299301
"jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp",
300302
"jni/WaterTankMonitoringClient-ReadImpl.cpp",
301303
"jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",

src/controller/data_model/controller-clusters.matter

+19
Original file line numberDiff line numberDiff line change
@@ -2943,6 +2943,25 @@ client cluster RefrigeratorAndTemperatureControlledCabinetModeSelect = 82 {
29432943
command ChangeToModeWithStatus(ChangeToModeWithStatusRequest): ChangeToModeResponse = 1;
29442944
}
29452945

2946+
/** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */
2947+
client cluster WasherControls = 83 {
2948+
bitmap Feature : BITMAP32 {
2949+
kSpin = 0x1;
2950+
kRinse = 0x2;
2951+
}
2952+
2953+
readonly attribute optional CHAR_STRING spinSpeeds[] = 0;
2954+
attribute optional nullable int8u spinSpeedCurrent = 1;
2955+
attribute optional nullable int8u numberOfRinses = 2;
2956+
readonly attribute optional int8u maxRinses = 3;
2957+
readonly attribute command_id generatedCommandList[] = 65528;
2958+
readonly attribute command_id acceptedCommandList[] = 65529;
2959+
readonly attribute event_id eventList[] = 65530;
2960+
readonly attribute attrib_id attributeList[] = 65531;
2961+
readonly attribute bitmap32 featureMap = 65532;
2962+
readonly attribute int16u clusterRevision = 65533;
2963+
}
2964+
29462965
/** 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. */
29472966
client cluster RvcRunModeSelect = 84 {
29482967
enum ModeTag : ENUM16 {

0 commit comments

Comments
 (0)