Skip to content

Commit

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

* zap generated

* Restyled by prettier-json

* update cluster-revision

* updated MicorwaveOvenMode for mode-base-cluster.xml

* Bump third_party/imgui/repo from `001f102` to `88fec09` (#30086)

Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `001f102` to `88fec09`.
- [Release notes](https://github.com/ocornut/imgui/releases)
- [Commits](ocornut/imgui@001f102...88fec09)

---
updated-dependencies:
- dependency-name: third_party/imgui/repo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump third_party/libwebsockets/repo from `a1cbc02` to `816544f` (#30083)

Bumps [third_party/libwebsockets/repo](https://github.com/warmcat/libwebsockets) from `a1cbc02` to `816544f`.
- [Commits](warmcat/libwebsockets@a1cbc02...816544f)

---
updated-dependencies:
- dependency-name: third_party/libwebsockets/repo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump third_party/ot-br-posix/repo from `69ce2a5` to `184d298` (#30084)

Bumps [third_party/ot-br-posix/repo](https://github.com/openthread/ot-br-posix) from `69ce2a5` to `184d298`.
- [Release notes](https://github.com/openthread/ot-br-posix/releases)
- [Commits](openthread/ot-br-posix@69ce2a5...184d298)

---
updated-dependencies:
- dependency-name: third_party/ot-br-posix/repo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Make `Power source configuration cluster` match the spec (minor type change) (#30062)

* Type of sources should be endpoint_no instead of raw int8u

* Zap regen

* Make `Localization Configuration Cluster` match the spec (#30058)

* Switch XML to get manage privilege for activeLocale write

* ZAP regen

* [TI] Feature ti sysconfig 1 16 2 update (#30073)

* Update README Files to reference latest SYSCONFIG Version

* Update Sysconfig version for CI

* Update docker version

* [Kotlin] Uses Kotlin's coroutines to handle the asynchronous operation and returns the result directly  (#30082)

* Update the kotlin type mapping

* Remove callback from fun

* Update `Temperature Measurement Cluster` to spec (#30093)

* Update data type

* ZAP regen

* esp32: make the shell command line buffer size configurable (#30050)

* [nrfconnect] Updated nRF Connect SDK version in Docker to 2.5.0 (#30051)

Regular update of nRF Connect SDK to 2.5.0 version including
zephyr toolchain and west versions bump.

* Make timedInvokeTimeoutMs optional (#30099)

* fix MicrowaveOvenMode xml files and re-commit

* fix adding MicrowaveOvenMode xml environment problem

* revised MicrowaveOvenMode xml for the value of revision

* commit to revise revision value and fix environment problem for MicrowaveOvenMode

* revised merged src/controller/data_model/BUILD.gn

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: mideayanghui <yanghui65@midea.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrei Litvin <andy314@gmail.com>
Co-authored-by: adabreuti <76965454+adabreuti@users.noreply.github.com>
Co-authored-by: Yufeng Wang <yufengwang@google.com>
Co-authored-by: Wang Qixiang <43193572+wqx6@users.noreply.github.com>
Co-authored-by: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com>
  • Loading branch information
9 people authored Nov 1, 2023
1 parent 7f431df commit c2fae17
Show file tree
Hide file tree
Showing 52 changed files with 3,712 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-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 \
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-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";
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-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" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?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="0x005E"/>
<item value="0x4000" name="Normal"/>
<item value="0x4001" name="Defrost"/>
</enum>

<cluster apiMaturity="provisional">
<domain>General</domain>
<name>Microwave Oven Mode</name>
<code>0x005E</code>
<define>MICROWAVE_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>
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
</cluster>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This is because zap does not currently support generating code for clusters that
<cluster code="0x0054"/>
<cluster code="0x0055"/>
<cluster code="0x0059"/>
<cluster code="0x005E"/>
<!-- MfgCode has been deprecated -->
<item name="MfgCode" type="vendor_id" optional="true"/>
<item name="Value" type="enum16" optional="false"/>
Expand All @@ -40,6 +41,7 @@ This is because zap does not currently support generating code for clusters that
<cluster code="0x0054"/>
<cluster code="0x0055"/>
<cluster code="0x0059"/>
<cluster code="0x005E"/>
<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 @@ -85,6 +87,7 @@ This is because zap does not currently support generating code for clusters that
<cluster code="0x0054"/>
<cluster code="0x0055"/>
<cluster code="0x0059"/>
<cluster code="0x005E"/>
<field name="OnOff" mask="0x1"/>
</bitmap>
</configurator>
2 changes: 2 additions & 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-mode-cluster.xml",
"microwave-oven-control-cluster.xml",
"door-lock-cluster.xml",
"electrical-measurement-cluster.xml",
Expand Down Expand Up @@ -325,6 +326,7 @@
"OnMode",
"FeatureMap"
],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Laundry Washer Mode": [
"SupportedModes",
"CurrentMode",
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"diagnostic-logs-cluster.xml",
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
"microwave-oven-mode-cluster.xml",
"door-lock-cluster.xml",
"electrical-measurement-cluster.xml",
"ethernet-network-diagnostics-cluster.xml",
Expand Down Expand Up @@ -323,6 +324,7 @@
"OnMode",
"FeatureMap"
],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Laundry Washer Mode": [
"SupportedModes",
"CurrentMode",
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 @@ -29,6 +29,7 @@
"DIAGNOSTIC_LOGS_CLUSTER": [],
"DISHWASHER_ALARM_CLUSTER": [],
"DISHWASHER_MODE_CLUSTER": [],
"MICROWAVE_OVEN_MODE_CLUSTER": [],
"DOOR_LOCK_CLUSTER": [],
"ELECTRICAL_MEASUREMENT_CLUSTER": [],
"ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [],
Expand Down Expand Up @@ -153,6 +154,7 @@
"DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"],
"DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"],
"DISHWASHER_MODE_CLUSTER": ["mode-base-server"],
"MICROWAVE_OVEN_MODE_CLUSTER": ["mode-base-server"],
"DOOR_LOCK_CLUSTER": ["door-lock-server"],
"ELECTRICAL_MEASUREMENT_CLUSTER": [],
"ETHERNET_NETWORK_DIAGNOSTICS_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/MicrowaveOvenModeClient-InvokeSubscribeImpl.cpp",
"jni/MicrowaveOvenModeClient-ReadImpl.cpp",
"jni/MicrowaveOvenControlClient-InvokeSubscribeImpl.cpp",
"jni/MicrowaveOvenControlClient-ReadImpl.cpp",
"jni/DoorLockClient-InvokeSubscribeImpl.cpp",
Expand Down
32 changes: 32 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3357,6 +3357,38 @@ client cluster DishwasherAlarm = 93 {
command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional client cluster MicrowaveOvenMode = 94 {
enum ModeTag : enum16 {
kNormal = 16384;
kDefrost = 16385;
}

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;
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;
}

/** Attributes and commands for configuring the microwave oven control, and reporting cooking stats. */
provisional client cluster MicrowaveOvenControl = 95 {
readonly attribute elapsed_s cookTime = 1;
Expand Down
42 changes: 42 additions & 0 deletions src/controller/data_model/controller-clusters.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2601,6 +2601,48 @@
}
]
},
{
"name": "Microwave Oven Mode",
"code": 94,
"mfgCode": null,
"define": "MICROWAVE_OVEN_MODE_CLUSTER",
"side": "client",
"enabled": 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": "Operational State",
"code": 96,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13655,6 +13655,159 @@ public void subscribeClusterRevisionAttribute(
private native void subscribeClusterRevisionAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
}

public static class MicrowaveOvenModeCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 94L;

public MicrowaveOvenModeCluster(long devicePtr, int endpointId) {
super(devicePtr, endpointId);
}

@Override
public native long initWithDevice(long devicePtr, int endpointId);

public interface SupportedModesAttributeCallback {
void onSuccess(List<ChipStructs.MicrowaveOvenModeClusterModeOptionStruct> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface GeneratedCommandListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface AcceptedCommandListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface EventListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public interface AttributeListAttributeCallback {
void onSuccess(List<Long> value);
void onError(Exception ex);
default void onSubscriptionEstablished(long subscriptionId) {}
}

public void readSupportedModesAttribute(
SupportedModesAttributeCallback callback) {
readSupportedModesAttribute(chipClusterPtr, callback);
}

public void subscribeSupportedModesAttribute(
SupportedModesAttributeCallback callback, int minInterval, int maxInterval) {
subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readCurrentModeAttribute(
IntegerAttributeCallback callback) {
readCurrentModeAttribute(chipClusterPtr, callback);
}

public void subscribeCurrentModeAttribute(
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback) {
readGeneratedCommandListAttribute(chipClusterPtr, callback);
}

public void subscribeGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readAcceptedCommandListAttribute(
AcceptedCommandListAttributeCallback callback) {
readAcceptedCommandListAttribute(chipClusterPtr, callback);
}

public void subscribeAcceptedCommandListAttribute(
AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readEventListAttribute(
EventListAttributeCallback callback) {
readEventListAttribute(chipClusterPtr, callback);
}

public void subscribeEventListAttribute(
EventListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readAttributeListAttribute(
AttributeListAttributeCallback callback) {
readAttributeListAttribute(chipClusterPtr, callback);
}

public void subscribeAttributeListAttribute(
AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readFeatureMapAttribute(
LongAttributeCallback callback) {
readFeatureMapAttribute(chipClusterPtr, callback);
}

public void subscribeFeatureMapAttribute(
LongAttributeCallback callback, int minInterval, int maxInterval) {
subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readClusterRevisionAttribute(
IntegerAttributeCallback callback) {
readClusterRevisionAttribute(chipClusterPtr, callback);
}

public void subscribeClusterRevisionAttribute(
IntegerAttributeCallback callback, int minInterval, int maxInterval) {
subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

private native void readSupportedModesAttribute(long chipClusterPtr, SupportedModesAttributeCallback callback);

private native void subscribeSupportedModesAttribute(long chipClusterPtr, SupportedModesAttributeCallback callback, int minInterval, int maxInterval);

private native void readCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback);

private native void subscribeCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);

private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback);

private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval);

private native void readAcceptedCommandListAttribute(long chipClusterPtr, AcceptedCommandListAttributeCallback callback);

private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval);

private native void readEventListAttribute(long chipClusterPtr, EventListAttributeCallback callback);

private native void subscribeEventListAttribute(long chipClusterPtr, EventListAttributeCallback callback, int minInterval, int maxInterval);

private native void readAttributeListAttribute(long chipClusterPtr, AttributeListAttributeCallback callback);

private native void subscribeAttributeListAttribute(long chipClusterPtr, AttributeListAttributeCallback callback, int minInterval, int maxInterval);

private native void readFeatureMapAttribute(long chipClusterPtr, LongAttributeCallback callback);

private native void subscribeFeatureMapAttribute(long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval);

private native void readClusterRevisionAttribute(long chipClusterPtr, IntegerAttributeCallback callback);

private native void subscribeClusterRevisionAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);
}

public static class MicrowaveOvenControlCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 95L;

Expand Down
Loading

0 comments on commit c2fae17

Please sign in to comment.