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 microwave oven mode cluster xml #30018

Merged
merged 28 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e9072d6
add microwave oven mode cluster xml
mideayanghui Oct 26, 2023
67798eb
zap generated
mideayanghui Oct 26, 2023
3cacd88
Merge master branch into add-microwave-example branch
mideayanghui Oct 27, 2023
a7846b0
Restyled by prettier-json
restyled-commits Oct 27, 2023
f1100d1
Merge branch 'master' into add-microwave-example
mideayanghui Oct 30, 2023
1552be3
update cluster-revision
mideayanghui Oct 30, 2023
d8b0e85
updated MicorwaveOvenMode for mode-base-cluster.xml
mideayanghui Oct 31, 2023
5c98c82
Bump third_party/imgui/repo from `001f102` to `88fec09` (#30086)
dependabot[bot] Oct 30, 2023
c444a4b
Bump third_party/libwebsockets/repo from `a1cbc02` to `816544f` (#30083)
dependabot[bot] Oct 30, 2023
5723e5a
Bump third_party/ot-br-posix/repo from `69ce2a5` to `184d298` (#30084)
dependabot[bot] Oct 30, 2023
43a2a1b
Make `Power source configuration cluster` match the spec (minor type …
andy31415 Oct 30, 2023
635a56f
Make `Localization Configuration Cluster` match the spec (#30058)
andy31415 Oct 30, 2023
1ca08ba
[TI] Feature ti sysconfig 1 16 2 update (#30073)
adabreuti Oct 30, 2023
df90226
[Kotlin] Uses Kotlin's coroutines to handle the asynchronous operatio…
yufengwangca Oct 30, 2023
99fda75
Update `Temperature Measurement Cluster` to spec (#30093)
andy31415 Oct 30, 2023
6fdec07
esp32: make the shell command line buffer size configurable (#30050)
wqx6 Oct 30, 2023
aa8f7cb
[nrfconnect] Updated nRF Connect SDK version in Docker to 2.5.0 (#30051)
kkasperczyk-no Oct 30, 2023
59eedbd
Make timedInvokeTimeoutMs optional (#30099)
yufengwangca Oct 30, 2023
0cba9c4
fix MicrowaveOvenMode xml files and re-commit
mideayanghui Oct 31, 2023
131180d
Merge branch 'master' into add-microwave-example
mideayanghui Oct 31, 2023
80cd17f
Merge branch 'master' into add-microwave-example
mideayanghui Oct 31, 2023
ff58c27
fix adding MicrowaveOvenMode xml environment problem
mideayanghui Oct 31, 2023
90341ff
revised MicrowaveOvenMode xml for the value of revision
mideayanghui Nov 1, 2023
14d3b1d
merge master branch
mideayanghui Nov 1, 2023
fc8c7b3
Merge branch 'master' into add-microwave-example
mideayanghui Nov 1, 2023
c16f380
commit to revise revision value and fix environment problem for Micro…
mideayanghui Nov 1, 2023
a985e2c
revised merged src/controller/data_model/BUILD.gn
mideayanghui Nov 1, 2023
dbfebf3
Merge branch 'master' into add-microwave-example
mideayanghui Nov 1, 2023
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 @@ -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 @@ -326,6 +327,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 @@ -324,6 +325,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 @@ -3358,6 +3358,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 @@ -13669,6 +13669,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
Loading