Skip to content

Commit

Permalink
Number of rinses change washer controls xml (#27436)
Browse files Browse the repository at this point in the history
* Fixes for Number Of Rinses Enum to add to XMl and align with spec

* Spacing

* Fixing code gen for XML

* Updating build.gn for failing test

* Update src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml

Co-authored-by: Boris Zbarsky <[email protected]>

* Regen again with changes

---------

Co-authored-by: abeck-riis <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Aug 2, 2023
1 parent 99768b7 commit 3668595
Show file tree
Hide file tree
Showing 43 changed files with 3,041 additions and 437 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,19 @@ limitations under the License.
<field mask="0x02" name="Rinse"/>
</bitmap>

<enum name="NumberOfRinsesEnum" type="ENUM8">
<cluster code="0x0053"/>
<item name="None" value="0x0"/>
<item name="Normal" value="0x1"/>
<item name="Extra" value="0x2"/>
<item name="Max" value="0x3"/>
</enum>

<cluster>
<domain>Appliances</domain>
<name>Washer Controls</name>
<name>Laundry Washer Controls</name>
<code>0x0053</code>
<define>WASHER_CONTROLS_CLUSTER</define>
<define>LAUNDRY_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>
Expand All @@ -36,7 +44,8 @@ limitations under the License.

<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>
<attribute side="server" code="0x0002" define="NUMBER_OF_RINSES" type="NumberOfRinsesEnum" writable="true" isNullable="false" optional="true">NumberOfRinses</attribute>
<attribute side="server" code="0x0003" define="SUPPORTED_RINSES" type="ARRAY" entryType="NumberOfRinsesEnum" writable="false" isNullable="false" optional="true">SupportedRinses</attribute>
</cluster>
</configurator>

2 changes: 1 addition & 1 deletion src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"UV_FILTER_MONITORING_CLUSTER": [],
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"WAKE_ON_LAN_CLUSTER": [],
"WASHER_CONTROLS_CLUSTER": [],
"LAUNDRY_WASHER_CONTROLS_CLUSTER": [],
"WATER_TANK_MONITORING_CLUSTER": [],
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
"WINDOW_COVERING_CLUSTER": [],
Expand Down
4 changes: 2 additions & 2 deletions src/controller/data_model/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,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/LaundryWasherControlsClient-InvokeSubscribeImpl.cpp",
"jni/LaundryWasherControlsClient-ReadImpl.cpp",
"jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp",
"jni/WaterTankMonitoringClient-ReadImpl.cpp",
"jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp",
Expand Down
13 changes: 10 additions & 3 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2895,16 +2895,23 @@ client cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 {
}

/** 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 {
client cluster LaundryWasherControls = 83 {
enum NumberOfRinsesEnum : ENUM8 {
kNone = 0;
kNormal = 1;
kExtra = 2;
kMax = 3;
}

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;
attribute optional NumberOfRinsesEnum numberOfRinses = 2;
readonly attribute optional NumberOfRinsesEnum supportedRinses[] = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
8 changes: 4 additions & 4 deletions src/controller/data_model/controller-clusters.zap
Original file line number Diff line number Diff line change
Expand Up @@ -11170,10 +11170,10 @@
]
},
{
"name": "Washer Controls",
"name": "Laundry Washer Controls",
"code": 83,
"mfgCode": null,
"define": "WASHER_CONTROLS_CLUSTER",
"define": "LAUNDRY_WASHER_CONTROLS_CLUSTER",
"side": "client",
"enabled": 1,
"attributes": [
Expand Down Expand Up @@ -11212,10 +11212,10 @@
]
},
{
"name": "Washer Controls",
"name": "Laundry Washer Controls",
"code": 83,
"mfgCode": null,
"define": "WASHER_CONTROLS_CLUSTER",
"define": "LAUNDRY_WASHER_CONTROLS_CLUSTER",
"side": "server",
"enabled": 0,
"attributes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == RefrigeratorAndTemperatureControlledCabinetMode.ID) {
return new RefrigeratorAndTemperatureControlledCabinetMode();
}
if (clusterId == WasherControls.ID) {
return new WasherControls();
if (clusterId == LaundryWasherControls.ID) {
return new LaundryWasherControls();
}
if (clusterId == RvcRunMode.ID) {
return new RvcRunMode();
Expand Down Expand Up @@ -6565,7 +6565,7 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
public static class WasherControls implements BaseCluster {
public static class LaundryWasherControls implements BaseCluster {
public static final long ID = 83L;
public long getID() {
return ID;
Expand All @@ -6575,7 +6575,7 @@ public enum Attribute {
SpinSpeeds(0L),
SpinSpeedCurrent(1L),
NumberOfRinses(2L),
MaxRinses(3L),
SupportedRinses(3L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
Expand Down
Loading

0 comments on commit 3668595

Please sign in to comment.