Skip to content

Commit 4117315

Browse files
rbultmanbzbarsky-apple
authored andcommitted
Add XML and zap gen for dishwasher alarm cluster (#26771)
* Add XML and zap gen for dish alarm * Apply suggestions from code review Co-authored-by: Boris Zbarsky <[email protected]> * Added feature map * Change after merge from upstream and regen-all * Adding files after manual step * Commits after regen-all * Add missing stuff to build.gn * Revert autoformat changes * Revert reformat changes * Revert autoformat changes * Changes per spec changes * Changed name * Add non-gen'd files * Commit after build following merge --------- Co-authored-by: Boris Zbarsky <[email protected]>
1 parent 078893f commit 4117315

Some content is hidden

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

54 files changed

+6170
-157
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jobs:
145145
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
146146
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
147147
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
148+
src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml \
148149
src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml \
149150
src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \
150151
src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/concentration-measurement-clu
2323
load "../src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml";
2424
load "../src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml";
2525
load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml";
26+
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml";
2627
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml";
2728
load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml";
2829
load "../src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml";

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

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<xi:include href="chip/content-launch-cluster.xml" />
2222
<xi:include href="chip/descriptor-cluster.xml" />
2323
<xi:include href="chip/diagnostic-logs-cluster.xml" />
24+
<xi:include href="chip/dishwasher-alarm-cluster.xml" />
2425
<xi:include href="chip/dishwasher-mode-cluster.xml" />
2526
<xi:include href="chip/door-lock-cluster.xml" />
2627
<xi:include href="chip/ethernet-network-diagnostics-cluster.xml" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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="AlarmMap" type="BITMAP32">
21+
<cluster code="0x005D" />
22+
<field name="InflowError" mask="0x01"/>
23+
<field name="DrainError" mask="0x02"/>
24+
<field name="DoorError" mask="0x04"/>
25+
<field name="TempTooLow" mask="0x08"/>
26+
<field name="TempTooHigh" mask="0x10"/>
27+
<field name="WaterLevelError" mask="0x20"/>
28+
</bitmap>
29+
30+
<cluster>
31+
<name>Dishwasher Alarm</name>
32+
<domain>Appliances</domain>
33+
<description>Attributes and commands for configuring the Dishwasher alarm.</description>
34+
<code>0x005D</code>
35+
<define>DISHWASHER_ALARM_CLUSTER</define>
36+
37+
<client tick="false" init="false">true</client>
38+
<server tick="false" init="false">true</server>
39+
40+
<attribute side="server" code="0x0000" define="MASK" type="AlarmMap" default="0" writable="false" optional="false">Mask</attribute>
41+
<attribute side="server" code="0x0001" define="LATCH" type="AlarmMap" default="0" writable="false" optional="true">Latch</attribute>
42+
<attribute side="server" code="0x0002" define="STATE" type="AlarmMap" default="0" writable="false" optional="false">State</attribute>
43+
<attribute side="server" code="0x0003" define="SUPPORTED" type="AlarmMap" default="0" writable="false" optional="false">Supported</attribute>
44+
45+
<command source="client" code="0x00" name="Reset" optional="true">
46+
<description>Reset alarm</description>
47+
<arg name="Alarms" type="AlarmMap" optional="false"/>
48+
</command>
49+
50+
<command source="client" code="0x01" name="ModifyEnabledAlarms" optional="true">
51+
<description>Modify enabled alarms</description>
52+
<arg name="Mask" type="AlarmMap" optional="false"/>
53+
</command>
54+
55+
<event side="server" code="0x00" priority="info" name="Notify" optional="false">
56+
<description>Notify</description>
57+
<field id="0" name="Active" type="AlarmMap" />
58+
<field id="1" name="Inactive" type="AlarmMap" />
59+
<field id="2" name="State" type="AlarmMap" />
60+
<field id="3" name="Mask" type="AlarmMap" />
61+
</event>
62+
</cluster>
63+
</configurator>

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

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"content-launch-cluster.xml",
3636
"descriptor-cluster.xml",
3737
"diagnostic-logs-cluster.xml",
38+
"dishwasher-alarm-cluster.xml",
3839
"dishwasher-mode-cluster.xml",
3940
"door-lock-cluster.xml",
4041
"electrical-measurement-cluster.xml",

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

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"content-launch-cluster.xml",
3535
"descriptor-cluster.xml",
3636
"diagnostic-logs-cluster.xml",
37+
"dishwasher-alarm-cluster.xml",
3738
"dishwasher-mode-cluster.xml",
3839
"door-lock-cluster.xml",
3940
"electrical-measurement-cluster.xml",

src/app/zap_cluster_list.json

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"DESCRIPTOR_CLUSTER": [],
3737
"DEVICE_TEMP_CLUSTER": [],
3838
"DIAGNOSTIC_LOGS_CLUSTER": [],
39+
"DISHWASHER_ALARM_CLUSTER": [],
3940
"DISHWASHER_MODE_CLUSTER": [],
4041
"DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [],
4142
"DOOR_LOCK_CLUSTER": [],
@@ -187,6 +188,7 @@
187188
"DESCRIPTOR_CLUSTER": ["descriptor"],
188189
"DEVICE_TEMP_CLUSTER": [],
189190
"DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"],
191+
"DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"],
190192
"DISHWASHER_MODE_CLUSTER": ["mode-select-server"],
191193
"DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [],
192194
"DOOR_LOCK_CLUSTER": ["door-lock-server"],

src/controller/data_model/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ if (current_os == "android" || matter_enable_java_compilation) {
108108
"jni/DescriptorClient-ReadImpl.cpp",
109109
"jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp",
110110
"jni/DiagnosticLogsClient-ReadImpl.cpp",
111+
"jni/DishwasherAlarmClient-InvokeSubscribeImpl.cpp",
112+
"jni/DishwasherAlarmClient-ReadImpl.cpp",
111113
"jni/DishwasherModeClient-InvokeSubscribeImpl.cpp",
112114
"jni/DishwasherModeClient-ReadImpl.cpp",
113115
"jni/DissolvedOxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",

src/controller/data_model/controller-clusters.matter

+43
Original file line numberDiff line numberDiff line change
@@ -3258,6 +3258,49 @@ client cluster SmokeCoAlarm = 92 {
32583258
command SelfTestRequest(): DefaultSuccess = 0;
32593259
}
32603260

3261+
/** Attributes and commands for configuring the Dishwasher alarm. */
3262+
client cluster DishwasherAlarm = 93 {
3263+
bitmap AlarmMap : BITMAP32 {
3264+
kInflowError = 0x1;
3265+
kDrainError = 0x2;
3266+
kDoorError = 0x4;
3267+
kTempTooLow = 0x8;
3268+
kTempTooHigh = 0x10;
3269+
kWaterLevelError = 0x20;
3270+
}
3271+
3272+
info event Notify = 0 {
3273+
AlarmMap active = 0;
3274+
AlarmMap inactive = 1;
3275+
AlarmMap state = 2;
3276+
AlarmMap mask = 3;
3277+
}
3278+
3279+
readonly attribute AlarmMap mask = 0;
3280+
readonly attribute optional AlarmMap latch = 1;
3281+
readonly attribute AlarmMap state = 2;
3282+
readonly attribute AlarmMap supported = 3;
3283+
readonly attribute command_id generatedCommandList[] = 65528;
3284+
readonly attribute command_id acceptedCommandList[] = 65529;
3285+
readonly attribute event_id eventList[] = 65530;
3286+
readonly attribute attrib_id attributeList[] = 65531;
3287+
readonly attribute bitmap32 featureMap = 65532;
3288+
readonly attribute int16u clusterRevision = 65533;
3289+
3290+
request struct ResetRequest {
3291+
AlarmMap alarms = 0;
3292+
}
3293+
3294+
request struct ModifyEnabledAlarmsRequest {
3295+
AlarmMap mask = 0;
3296+
}
3297+
3298+
/** Reset alarm */
3299+
command Reset(ResetRequest): DefaultSuccess = 0;
3300+
/** Modify enabled alarms */
3301+
command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1;
3302+
}
3303+
32613304
/** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */
32623305
client cluster OperationalState = 96 {
32633306
enum ErrorStateEnum : ENUM8 {

0 commit comments

Comments
 (0)