Skip to content

Commit

Permalink
Add microwave oven control cluster xml (#30044)
Browse files Browse the repository at this point in the history
* add microwave oven control cluster

* Restyled by prettier-json

* commit new generated files

* updated for the MicrowaveOvenControl Cluster xml related files

* Updated for the relative files of MicrowaveOvenControl cluster

* fix zcl.json for MicrowaveOvenControl cluster

* regen relative files

* fix MicrowaveOvenControl environment problem

---------

Co-authored-by: mideayanghui <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
3 people authored Oct 31, 2023
1 parent d1d09a9 commit 5218c3b
Show file tree
Hide file tree
Showing 48 changed files with 4,877 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
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/microwave-oven-control-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 \
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 @@ -25,6 +25,7 @@ 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/microwave-oven-control-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";
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 @@ -23,6 +23,7 @@
<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/microwave-oven-control-cluster.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
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?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"/>

<cluster apiMaturity="provisional">
<name>Microwave Oven Control</name>
<domain>Appliances</domain>
<description>Attributes and commands for configuring the microwave oven control, and reporting cooking stats.</description>
<code>0x005F</code>
<define>MICROWAVE_OVEN_CONTROL_CLUSTER</define>
<client tick="false" init="false">true</client>
<server tick="false" init="false">true</server>
<attribute side="server" code="0x0001" define="COOK_TIME" type="elapsed_s" default="30" writable="false" optional="false">CookTime</attribute>
<attribute side="server" code="0x0002" define="POWER_SETTING" type="int8u" default="100" writable="false" optional="false">PowerSetting</attribute>
<attribute side="server" code="0x0003" define="MIN_POWER" type="int8u" default="10" writable="false" optional="true">MinPower</attribute>
<attribute side="server" code="0x0004" define="MAX_POWER" type="int8u" default="100" writable="false" optional="true">MaxPower</attribute>
<attribute side="server" code="0x0005" define="POWERSTEP" type="int8u" default="10" writable="false" optional="true">PowerStep</attribute>

<command source="client" code="0x00" name="SetCookingParameters" optional="false">
<description>Set Cooking Parameters</description>
<arg name="CookMode" type="int8u" optional="true"/>
<arg name="CookTime" type="elapsed_s" optional="true"/>
<arg name="PowerSetting" type="int8u" min="MIN_POWER" max="MAX_POWER" optional="true"/>
</command>
<command source="client" code="0x01" name="AddMoreTime" optional="true">
<description>Add More Cooking Time</description>
<arg name="TimeToAdd" type="elapsed_s" optional="false"/>
</command>
</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 @@ -37,6 +37,7 @@
"diagnostic-logs-cluster.xml",
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
"microwave-oven-control-cluster.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 @@ -89,6 +89,7 @@
"switch-cluster.xml",
"target-navigator-cluster.xml",
"temperature-control-cluster.xml",
"microwave-oven-control-cluster.xml",
"temperature-measurement-cluster.xml",
"test-cluster.xml",
"thermostat-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 @@ -53,6 +53,7 @@
"LOW_POWER_CLUSTER": [],
"MEDIA_INPUT_CLUSTER": [],
"MEDIA_PLAYBACK_CLUSTER": [],
"MICROWAVE_OVEN_CONTROL_CLUSTER": [],
"MODE_SELECT_CLUSTER": [],
"NETWORK_COMMISSIONING_CLUSTER": [],
"SAMPLE_MEI_CLUSTER": [],
Expand Down Expand Up @@ -182,6 +183,7 @@
"LOW_POWER_CLUSTER": ["low-power-server"],
"MEDIA_INPUT_CLUSTER": ["media-input-server"],
"MEDIA_PLAYBACK_CLUSTER": ["media-playback-server"],
"MICROWAVE_OVEN_CONTROL_CLUSTER": ["microwave-oven-control-server"],
"MODE_SELECT_CLUSTER": ["mode-select-server"],
"NETWORK_COMMISSIONING_CLUSTER": ["network-commissioning"],
"NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_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 @@ -114,6 +114,8 @@ if (current_os == "android" || matter_enable_java_compilation) {
"jni/DishwasherAlarmClient-ReadImpl.cpp",
"jni/DishwasherModeClient-InvokeSubscribeImpl.cpp",
"jni/DishwasherModeClient-ReadImpl.cpp",
"jni/MicrowaveOvenControlClient-InvokeSubscribeImpl.cpp",
"jni/MicrowaveOvenControlClient-ReadImpl.cpp",
"jni/DoorLockClient-InvokeSubscribeImpl.cpp",
"jni/DoorLockClient-ReadImpl.cpp",
"jni/ElectricalMeasurementClient-InvokeSubscribeImpl.cpp",
Expand Down
30 changes: 30 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3354,6 +3354,36 @@ client cluster DishwasherAlarm = 93 {
command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1;
}

/** Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */
provisional client cluster MicrowaveOvenControl = 95 {
readonly attribute elapsed_s cookTime = 1;
readonly attribute int8u powerSetting = 2;
readonly attribute optional int8u minPower = 3;
readonly attribute optional int8u maxPower = 4;
readonly attribute optional int8u powerStep = 5;
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 SetCookingParametersRequest {
optional int8u cookMode = 0;
optional elapsed_s cookTime = 1;
optional int8u powerSetting = 2;
}

request struct AddMoreTimeRequest {
elapsed_s timeToAdd = 0;
}

/** Set Cooking Parameters */
command SetCookingParameters(SetCookingParametersRequest): DefaultSuccess = 0;
/** Add More Cooking Time */
command AddMoreTime(AddMoreTimeRequest): 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
52 changes: 52 additions & 0 deletions src/controller/data_model/controller-clusters.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,58 @@
}
]
},
{
"name": "Microwave Oven Control",
"code": 1295,
"mfgCode": null,
"define": "MICROWAVE_OVEN_CONTROL_CLUSTER",
"side": "client",
"enabled": 1,
"commands": [
{
"name": "SetCookingParameters",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
}
],
"attributes": [
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "client",
"type": "bitmap32",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "client",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Electrical Measurement",
"code": 2820,
Expand Down
Loading

0 comments on commit 5218c3b

Please sign in to comment.