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 all 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 @@ -140,6 +140,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-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.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 \
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/concentration-measurement-clu
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-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.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";
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 @@ -21,6 +21,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-cluster.xml" />
<xi:include href="chip/dishwasher-mode-cluster.xml" />
<xi:include href="chip/door-lock-cluster.xml" />
<xi:include href="chip/ethernet-network-diagnostics-cluster.xml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?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="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_CLUSTER</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="false" optional="false">Mask</attribute>
<attribute side="server" code="0x0001" define="LATCH" type="AlarmMap" default="0" writable="false" optional="true">Latch</attribute>
<attribute side="server" code="0x0002" define="STATE" type="AlarmMap" default="0" writable="false" optional="false">State</attribute>
<attribute side="server" code="0x0003" define="SUPPORTED" type="AlarmMap" default="0" writable="false" optional="false">Supported</attribute>

<command source="client" code="0x00" name="Reset" optional="true">
<description>Reset alarm</description>
<arg name="Alarms" type="AlarmMap" optional="false"/>
</command>

<command source="client" code="0x01" name="ModifyEnabledAlarms" optional="true">
<description>Modify enabled alarms</description>
<arg name="Mask" type="AlarmMap" optional="false"/>
</command>

<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>
</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 @@ -35,6 +35,7 @@
"content-launch-cluster.xml",
"descriptor-cluster.xml",
"diagnostic-logs-cluster.xml",
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
"door-lock-cluster.xml",
"electrical-measurement-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 @@ -34,6 +34,7 @@
"content-launch-cluster.xml",
"descriptor-cluster.xml",
"diagnostic-logs-cluster.xml",
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
"door-lock-cluster.xml",
"electrical-measurement-cluster.xml",
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"DESCRIPTOR_CLUSTER": [],
"DEVICE_TEMP_CLUSTER": [],
"DIAGNOSTIC_LOGS_CLUSTER": [],
"DISHWASHER_ALARM_CLUSTER": [],
"DISHWASHER_MODE_CLUSTER": [],
"DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"DOOR_LOCK_CLUSTER": [],
Expand Down Expand Up @@ -187,6 +188,7 @@
"DESCRIPTOR_CLUSTER": ["descriptor"],
"DEVICE_TEMP_CLUSTER": [],
"DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"],
"DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"],
"DISHWASHER_MODE_CLUSTER": ["mode-select-server"],
"DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"DOOR_LOCK_CLUSTER": ["door-lock-server"],
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 @@ -108,6 +108,8 @@ if (current_os == "android" || matter_enable_java_compilation) {
"jni/DescriptorClient-ReadImpl.cpp",
"jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp",
"jni/DiagnosticLogsClient-ReadImpl.cpp",
"jni/DishwasherAlarmClient-InvokeSubscribeImpl.cpp",
"jni/DishwasherAlarmClient-ReadImpl.cpp",
"jni/DishwasherModeClient-InvokeSubscribeImpl.cpp",
"jni/DishwasherModeClient-ReadImpl.cpp",
"jni/DissolvedOxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
Expand Down
43 changes: 43 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3256,6 +3256,49 @@ 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;
}

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

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

request struct ResetRequest {
AlarmMap alarms = 0;
}

request struct ModifyEnabledAlarmsRequest {
AlarmMap mask = 0;
}

/** Reset alarm */
command Reset(ResetRequest): DefaultSuccess = 0;
/** Modify enabled alarms */
command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1;
}

/** 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. */
client cluster OperationalState = 96 {
enum ErrorStateEnum : ENUM8 {
Expand Down
Loading