Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XML and zap gen for dishwasher alarm cluster #26771

Merged
merged 19 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm.xml \
src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/fan-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 @@ -22,6 +22,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm.xml";
load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/fan-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 @@ -20,6 +20,7 @@
<xi:include href="chip/content-launch-cluster.xml" />
<xi:include href="chip/descriptor-cluster.xml" />
<xi:include href="chip/diagnostic-logs-cluster.xml" />
<xi:include href="chip/dishwasher-alarm.xml" />
<xi:include href="chip/door-lock-cluster.xml" />
<xi:include href="chip/ethernet-network-diagnostics-cluster.xml" />
<xi:include href="chip/fan-control-cluster.xml" />
Expand Down
68 changes: 68 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm.xml
bzbarsky-apple marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?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="0x005D" />
<field name="InflowError" mask="0x01" />
rbultman marked this conversation as resolved.
Show resolved Hide resolved
<field name="DrainError" mask="0x02" />
<field name="DoorError" mask="0x04" />
<field name="TempTooLow" mask="0x08" />
<field name="TempTooHigh" mask="0x10" />
<field name="WaterLevelError" mask="0x20" />
rbultman marked this conversation as resolved.
Show resolved Hide resolved
</bitmap>

<bitmap name="AlarmMap" type="BITMAP32">
<cluster code="0x005D" />
<field name="InflowError" mask="0x01"/>
<field name="DrainError" mask="0x02"/>
<field name="DoorError" mask="0x04"/>
<field name="TempTooLow" mask="0x08"/>
<field name="TempTooHigh" mask="0x10"/>
<field name="WaterLevelError" mask="0x20"/>
</bitmap>

<cluster>
<name>Dishwasher Alarm</name>
<domain>Appliances</domain>
<description>Attributes and commands for configuring the Dishwasher alarm.</description>
<code>0x005D</code>
<define>DISHWASHER_ALARM</define>

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

<attribute side="server" code="0x0000" define="MASK" type="AlarmMap" default="0" writable="true" optional="false">Mask</attribute>
rbultman marked this conversation as resolved.
Show resolved Hide resolved
<attribute side="server" code="0x0001" define="LATCH" type="AlarmMap" default="0" writable="false" optional="false">Latch</attribute>
rbultman marked this conversation as resolved.
Show resolved Hide resolved
<attribute side="server" code="0x0002" define="STATE" type="AlarmMap" default="0" writable="false" optional="false">State</attribute>

<command source="client" code="0x00" name="Reset" optional="false">
rbultman marked this conversation as resolved.
Show resolved Hide resolved
<description>Reset alarm</description>
<arg name="Alarms" type="AlarmMap" optional="false"/>
<arg name="Mask" type="AlarmMap" optional="true"/>
rbultman marked this conversation as resolved.
Show resolved Hide resolved
rbultman marked this conversation as resolved.
Show resolved Hide resolved
</command>

rbultman marked this conversation as resolved.
Show resolved Hide resolved
<event side="server" code="0x00" priority="info" name="Notify" optional="false">
<description>Notify</description>
<field id="0" name="Active" type="AlarmMap" />
<field id="1" name="Inactive" type="AlarmMap" />
<field id="2" name="State" type="AlarmMap" />
<field id="3" name="Mask" type="AlarmMap" />
</event>
</cluster>
rbultman marked this conversation as resolved.
Show resolved Hide resolved
</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 @@ -34,6 +34,7 @@
"content-launch-cluster.xml",
"descriptor-cluster.xml",
"diagnostic-logs-cluster.xml",
"dishwasher-alarm.xml",
"door-lock-cluster.xml",
"electrical-measurement-cluster.xml",
"ethernet-network-diagnostics-cluster.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 @@ -33,6 +33,7 @@
"content-launch-cluster.xml",
"descriptor-cluster.xml",
"diagnostic-logs-cluster.xml",
"dishwasher-alarm.xml",
"door-lock-cluster.xml",
"electrical-measurement-cluster.xml",
"ethernet-network-diagnostics-cluster.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 @@ -26,6 +26,7 @@
"DESCRIPTOR_CLUSTER": [],
"DEVICE_TEMP_CLUSTER": [],
"DIAGNOSTIC_LOGS_CLUSTER": [],
"DISHWASHER_ALARM": [],
"DOOR_LOCK_CLUSTER": [],
"ELECTRICAL_MEASUREMENT_CLUSTER": [],
"ELECTROSTATIC_FILTER_MONITORING_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 @@ -88,6 +88,8 @@ if (current_os == "android" || build_java_matter_controller) {
"jni/DescriptorClient-ReadImpl.cpp",
"jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp",
"jni/DiagnosticLogsClient-ReadImpl.cpp",
"jni/DishwasherAlarmClient-InvokeSubscribeImpl.cpp",
"jni/DishwasherAlarmClient-ReadImpl.cpp",
"jni/DoorLockClient-InvokeSubscribeImpl.cpp",
"jni/DoorLockClient-ReadImpl.cpp",
"jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp",
Expand Down
46 changes: 46 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2970,6 +2970,52 @@ client cluster SmokeCoAlarm = 92 {
command SelfTestRequest(): DefaultSuccess = 0;
}

/** Attributes and commands for configuring the Dishwasher alarm. */
client cluster DishwasherAlarm = 93 {
bitmap AlarmMap : BITMAP32 {
kInflowError = 0x1;
kDrainError = 0x2;
kDoorError = 0x4;
kTempTooLow = 0x8;
kTempTooHigh = 0x10;
kWaterLevelError = 0x20;
}

bitmap Feature : BITMAP32 {
kInflowError = 0x1;
kDrainError = 0x2;
kDoorError = 0x4;
kTempTooLow = 0x8;
kTempTooHigh = 0x10;
kWaterLevelError = 0x20;
}

info event Notify = 0 {
AlarmMap active = 0;
AlarmMap inactive = 1;
AlarmMap state = 2;
AlarmMap mask = 3;
}

attribute AlarmMap mask = 0;
readonly attribute AlarmMap latch = 1;
readonly attribute AlarmMap state = 2;
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;

request struct ResetRequest {
AlarmMap alarms = 0;
optional AlarmMap mask = 1;
}

/** Reset alarm */
command Reset(ResetRequest): DefaultSuccess = 0;
}

/** Attributes and commands for monitoring HEPA filters in a device */
client cluster HepaFilterMonitoring = 113 {
enum ChangeIndicationEnum : ENUM8 {
Expand Down
Loading