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

Oven Mode XML #30213

Merged
merged 3 commits into from
Nov 17, 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 @@ -144,6 +144,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/power-source-configuration-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 @@ -55,6 +55,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/pressure-measurement-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 @@ -56,6 +56,7 @@
<xi:include href="chip/operational-credentials-cluster.xml" />
<xi:include href="chip/operational-state-cluster.xml" />
<xi:include href="chip/operational-state-rvc-cluster.xml" />
<xi:include href="chip/oven-mode-cluster.xml" />
<xi:include href="chip/pressure-measurement-cluster.xml" />
<xi:include href="chip/power-source-cluster.xml" />
<xi:include href="chip/power-source-configuration-cluster.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This is because zap does not currently support generating code for clusters that
<cluster code="0x0055"/>
<cluster code="0x0059"/>
<cluster code="0x005E"/>
<cluster code="0x0049"/>
<!-- MfgCode has been deprecated -->
<item name="MfgCode" type="vendor_id" optional="true"/>
<item name="Value" type="enum16" optional="false"/>
Expand All @@ -42,6 +43,7 @@ This is because zap does not currently support generating code for clusters that
<cluster code="0x0055"/>
<cluster code="0x0059"/>
<cluster code="0x005E"/>
<cluster code="0x0049"/>
<item name="Label" type="char_string" length="64" optional="false"/>
<item name="Mode" type="int8u" optional="false"/>
<item name="ModeTags" type="ModeTagStruct" array="true" length="8" optional="false"/>
Expand Down Expand Up @@ -88,6 +90,7 @@ This is because zap does not currently support generating code for clusters that
<cluster code="0x0055"/>
<cluster code="0x0059"/>
<cluster code="0x005E"/>
<cluster code="0x0049"/>
<field name="OnOff" mask="0x1"/>
</bitmap>
</configurator>
65 changes: 65 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?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"/>

<enum name="ModeTag" type="enum16">
<cluster code="0x0049"/>
<item value="0x4000" name="Bake"/>
<item value="0x4001" name="Convection"/>
<item value="0x4002" name="Grill"/>
<item value="0x4003" name="Roast"/>
<item value="0x4004" name="Clean"/>
<item value="0x4005" name="Convection Bake"/>
<item value="0x4006" name="Convection Roast"/>
<item value="0x4007" name="Warming"/>
<item value="0x4008" name="Proofing"/>
</enum>

<cluster apiMaturity="provisional">
<domain>General</domain>
<name>Oven Mode</name>
<code>0x0049</code>
<define>OVEN_MODE_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Attributes and commands for selecting a mode from a list of supported options.</description>
<globalAttribute side="either" code="0xFFFD" value="1"/>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="SUPPORTED_MODES" type="ARRAY" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false" length="255">SupportedModes</attribute>
abeck-whirlpool marked this conversation as resolved.
Show resolved Hide resolved
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
<attribute side="server" code="0x0002" define="START_UP_MODE" type="int8u" writable="true" optional="true" isNullable="true">StartUpMode</attribute>
<attribute side="server" code="0x0003" define="ON_MODE" type="int8u" writable="true" optional="true" isNullable="true">OnMode</attribute>

<!-- Commands -->
<command source="client" code="0x00" name="ChangeToMode" response="ChangeToModeResponse" optional="false">
<description>
This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command.
</description>
<arg name="NewMode" type="int8u" optional="false"/>
</command>

<command source="server" code="0x01" name="ChangeToModeResponse" disableDefaultResponse="true" optional="false">
<description>
This command is sent by the device on receipt of the ChangeToModeWithStatus command.
</description>
<arg name="Status" type="enum8" optional="false"/>
<arg name="StatusText" type="char_string" lenght="64" optional="true"/>
</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 @@ -74,6 +74,7 @@
"operational-credentials-cluster.xml",
"operational-state-cluster.xml",
"operational-state-rvc-cluster.xml",
"oven-mode-cluster.xml",
"pressure-measurement-cluster.xml",
"power-source-cluster.xml",
"power-source-configuration-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 @@ -71,6 +71,7 @@
"operational-credentials-cluster.xml",
"operational-state-cluster.xml",
"operational-state-rvc-cluster.xml",
"oven-mode-cluster.xml",
"pressure-measurement-cluster.xml",
"power-source-cluster.xml",
"power-source-configuration-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 @@ -69,6 +69,7 @@
"OTA_BOOTLOAD_CLUSTER": [],
"OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [],
"OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [],
"OVEN_MODE_CLUSTER": [],
"OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"PM10_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"PM1_CONCENTRATION_MEASUREMENT_CLUSTER": [],
Expand Down Expand Up @@ -205,6 +206,7 @@
"OTA_BOOTLOAD_CLUSTER": [],
"OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": ["ota-provider"],
"OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": ["ota-requestor"],
"OVEN_MODE_CLUSTER": ["mode-base-server"],
"OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-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 @@ -184,6 +184,8 @@ if (current_os == "android" || matter_enable_java_compilation) {
"jni/OtaSoftwareUpdateProviderClient-ReadImpl.cpp",
"jni/OtaSoftwareUpdateRequestorClient-InvokeSubscribeImpl.cpp",
"jni/OtaSoftwareUpdateRequestorClient-ReadImpl.cpp",
"jni/OvenModeClient-InvokeSubscribeImpl.cpp",
"jni/OvenModeClient-ReadImpl.cpp",
"jni/OzoneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
"jni/OzoneConcentrationMeasurementClient-ReadImpl.cpp",
"jni/Pm10ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp",
Expand Down
54 changes: 54 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2880,6 +2880,60 @@ provisional client cluster Timer = 71 {
command ReduceTime(ReduceTimeRequest): DefaultSuccess = 3;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional client cluster OvenMode = 73 {
enum ModeTag : enum16 {
kBake = 16384;
kConvection = 16385;
kGrill = 16386;
kRoast = 16387;
kClean = 16388;
kConvectionBake = 16389;
kConvectionRoast = 16390;
kWarming = 16391;
kProofing = 16392;
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
}

struct ModeTagStruct {
optional vendor_id mfgCode = 0;
enum16 value = 1;
}

struct ModeOptionStruct {
char_string<64> label = 0;
int8u mode = 1;
ModeTagStruct modeTags[] = 2;
}

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 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 ChangeToModeRequest {
int8u newMode = 0;
}

response struct ChangeToModeResponse = 1 {
enum8 status = 0;
optional char_string statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
client cluster ModeSelect = 80 {
bitmap Feature : bitmap32 {
Expand Down
61 changes: 61 additions & 0 deletions src/controller/data_model/controller-clusters.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2044,6 +2044,67 @@
}
]
},
{
"name": "Oven Mode",
"code": 73,
"mfgCode": null,
"define": "OVEN_MODE_CLUSTER",
"side": "client",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "ChangeToMode",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "ChangeToModeResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "client",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"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": "Mode Select",
"code": 80,
Expand Down
Loading
Loading