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 11 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,199 changes: 599 additions & 600 deletions .github/workflows/tests.yaml

Large diffs are not rendered by default.

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.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-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.xml" />
<xi:include href="chip/dishwasher-mode-select-cluster.xml" />
<xi:include href="chip/door-lock-cluster.xml" />
<xi:include href="chip/ethernet-network-diagnostics-cluster.xml" />
Expand Down
72 changes: 72 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,72 @@
<?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="InflowAlarm" mask="0x01" />
<field name="DrainAlarm" mask="0x02" />
<field name="DoorAlarm" mask="0x04" />
<field name="LowTemperatureAlarm" mask="0x08" />
<field name="HighTemperatureAlarm" mask="0x10" />
<field name="WaterLevelAlarm" mask="0x20" />
</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="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>

<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="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>
61 changes: 48 additions & 13 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.xml",
"dishwasher-mode-select-cluster.xml",
"door-lock-cluster.xml",
"electrical-measurement-cluster.xml",
Expand Down Expand Up @@ -110,9 +111,15 @@
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
"options": {
"text": {
"defaultResponsePolicy": ["Always", "Conditional", "Never"]
"defaultResponsePolicy": [
"Always",
"Conditional",
"Never"
]
},
"bool": ["commandDiscovery"]
"bool": [
"commandDiscovery"
]
},
"defaults": {
"text": {
Expand Down Expand Up @@ -156,8 +163,12 @@
"CapabilityMinima",
"ProductAppearance"
],
"Bridged Device Basic Information": ["ProductAppearance"],
"Descriptor": ["ClusterRevision"],
"Bridged Device Basic Information": [
"ProductAppearance"
],
"Descriptor": [
"ClusterRevision"
],
"Ethernet Network Diagnostics": [
"PHYRate",
"FullDuplex",
Expand Down Expand Up @@ -203,7 +214,10 @@
"FeatureMap",
"ThreadMetrics"
],
"Scenes": ["SceneCount", "RemainingCapacity"],
"Scenes": [
"SceneCount",
"RemainingCapacity"
],
"Unit Testing": [
"struct_attr",
"nullable_struct",
Expand Down Expand Up @@ -287,10 +301,19 @@
"CurrentMaxRate",
"OverrunCount"
],
"Channel": ["Lineup", "CurrentChannel"],
"Media Playback": ["SampledPosition"],
"Application Launcher": ["CurrentApp"],
"Application Basic": ["Application"],
"Channel": [
"Lineup",
"CurrentChannel"
],
"Media Playback": [
rbultman marked this conversation as resolved.
Show resolved Hide resolved
"SampledPosition"
],
"Application Launcher": [
"CurrentApp"
],
"Application Basic": [
"Application"
],
"Time Synchronization": [
"TrustedTimeSource",
"DefaultNTP",
Expand All @@ -299,15 +322,27 @@
"UTCTime",
"LocalTime"
],
"Temperature Control": ["SupportedTemperatureLevels"],
"Operational State": ["OperationalState", "OperationalError"]
"Temperature Control": [
"SupportedTemperatureLevels"
],
"Operational State": [
"OperationalState",
"OperationalError"
]
},
"defaultReportingPolicy": "mandatory",
"ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
"ZCLDataTypes": [
"ARRAY",
"BITMAP",
"ENUM",
"NUMBER",
"STRING",
"STRUCT"
],
"fabricHandling": {
"automaticallyCreateFields": true,
"indexFieldId": 254,
"indexFieldName": "FabricIndex",
"indexType": "fabric_idx"
}
}
}
61 changes: 48 additions & 13 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.xml",
"dishwasher-mode-select-cluster.xml",
"door-lock-cluster.xml",
"electrical-measurement-cluster.xml",
Expand Down Expand Up @@ -108,9 +109,15 @@
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
"options": {
"text": {
"defaultResponsePolicy": ["Always", "Conditional", "Never"]
"defaultResponsePolicy": [
"Always",
"Conditional",
"Never"
]
},
"bool": ["commandDiscovery"]
"bool": [
"commandDiscovery"
]
},
"defaults": {
"text": {
Expand Down Expand Up @@ -154,8 +161,12 @@
"CapabilityMinima",
"ProductAppearance"
],
"Bridged Device Basic Information": ["ProductAppearance"],
"Descriptor": ["ClusterRevision"],
"Bridged Device Basic Information": [
"ProductAppearance"
],
"Descriptor": [
"ClusterRevision"
],
"Ethernet Network Diagnostics": [
"PHYRate",
"FullDuplex",
Expand Down Expand Up @@ -201,7 +212,10 @@
"FeatureMap",
"ThreadMetrics"
],
"Scenes": ["SceneCount", "RemainingCapacity"],
"Scenes": [
"SceneCount",
"RemainingCapacity"
],
"Unit Testing": [
"struct_attr",
"nullable_struct",
Expand Down Expand Up @@ -285,10 +299,19 @@
"CurrentMaxRate",
"OverrunCount"
],
"Channel": ["Lineup", "CurrentChannel"],
"Media Playback": ["SampledPosition"],
"Application Launcher": ["CurrentApp"],
"Application Basic": ["Application"],
"Channel": [
"Lineup",
"CurrentChannel"
],
"Media Playback": [
"SampledPosition"
],
"Application Launcher": [
"CurrentApp"
],
"Application Basic": [
"Application"
],
"Time Synchronization": [
"TrustedTimeSource",
"DefaultNTP",
Expand All @@ -297,15 +320,27 @@
"UTCTime",
"LocalTime"
],
"Temperature Control": ["SupportedTemperatureLevels"],
"Operational State": ["OperationalState", "OperationalError"]
"Temperature Control": [
"SupportedTemperatureLevels"
],
"Operational State": [
"OperationalState",
"OperationalError"
]
},
"defaultReportingPolicy": "mandatory",
"ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
"ZCLDataTypes": [
"ARRAY",
"BITMAP",
"ENUM",
"NUMBER",
"STRING",
"STRUCT"
],
"fabricHandling": {
"automaticallyCreateFields": true,
"indexFieldId": 254,
"indexFieldName": "FabricIndex",
"indexType": "fabric_idx"
}
}
}
Loading