From 2ab69d6c45bf9729e131b6926922cb98575f8003 Mon Sep 17 00:00:00 2001 From: eahove Date: Fri, 12 Jan 2024 16:17:43 -0600 Subject: [PATCH] OvenMode example Implementation (#30983) * Adding oven op state * Python regen * Fixing alignment * regenerate with oven device. * regenerated zap and chiptool * oven opState first pass builds and runs, but running tests results in a lot of failure messages. * tentative updates based on RVC * updated cluster name & fix build * regen zap * linux builds with oven mode update. * remove duplicate ovencacvity Entries * remove duplicate oven cavity entry * Revert "remove duplicate ovencacvity Entries" This reverts commit 87e891ebcf342f6cb70e17c36e36c8370c2b9983. * cleanup for ovenMode * cleanup: remove operationalState changes * update config-data. Regen. * Restyled by clang-format * Reverting files.gni, settings.json * adding to emberAf function to get it compiled * adding oven-modes.cpp to more make files. * Adding to 2 more make files * removed "server" init(), struck from init list * removed references to ovenCavityOperationalState * Regenerated Zap * zap regen after rebase * updating name of dryer control endpoint count * fixing merge for telink * cleanup auto-format changes * Fix zap file merge error --------- Co-authored-by: abeck-riis <98488327+abeck-riis@users.noreply.github.com> Co-authored-by: Restyled.io --- .../all-clusters-app.matter | 67 ++++++++ .../all-clusters-common/all-clusters-app.zap | 152 +++++++++++++++++- .../all-clusters-common/include/oven-modes.h | 106 ++++++++++++ .../all-clusters-common/src/oven-modes.cpp | 107 ++++++++++++ .../all-clusters-app/ameba/chip_main.cmake | 1 + examples/all-clusters-app/asr/BUILD.gn | 1 + .../all-clusters-app/cc13x2x7_26x2x7/BUILD.gn | 1 + .../all-clusters-app/cc13x4_26x4/BUILD.gn | 1 + .../esp32/main/CMakeLists.txt | 1 + .../all-clusters-app/infineon/psoc6/BUILD.gn | 1 + .../linux/AllClustersCommandDelegate.cpp | 1 + examples/all-clusters-app/linux/BUILD.gn | 1 + .../all-clusters-app/linux/main-common.cpp | 2 + examples/all-clusters-app/mbed/CMakeLists.txt | 1 + .../nrfconnect/CMakeLists.txt | 1 + examples/all-clusters-app/nxp/mw320/BUILD.gn | 1 + .../openiotsdk/CMakeLists.txt | 1 + examples/all-clusters-app/tizen/BUILD.gn | 1 + src/app/common/templates/config-data.yaml | 1 + src/app/util/util.cpp | 1 + .../data_model/controller-clusters.zap | 12 +- .../app-common/zap-generated/callback.h | 6 - 22 files changed, 448 insertions(+), 19 deletions(-) create mode 100644 examples/all-clusters-app/all-clusters-common/include/oven-modes.h create mode 100644 examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 5bc66b1bdc68de..9c3e474946addf 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2785,6 +2785,62 @@ cluster BooleanState = 69 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for selecting a mode from a list of supported options. */ +provisional cluster OvenMode = 73 { + revision 1; + + 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; +} + /** This cluster supports remotely monitoring and controling the different typs of functionality available to a drying device, such as a laundry dryer. */ cluster LaundryDryerControls = 74 { @@ -7080,6 +7136,17 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster OvenMode { + callback attribute supportedModes; + ram attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + server cluster LaundryDryerControls { callback attribute supportedDrynessLevels; ram attribute selectedDrynessLevel; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index a5d06276bbc56e..0c14d72717e091 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -8408,6 +8408,145 @@ } ] }, + { + "name": "Oven Mode", + "code": 73, + "mfgCode": null, + "define": "OVEN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "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": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Laundry Dryer Controls", "code": 74, @@ -8426,7 +8565,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8458,7 +8597,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8474,7 +8613,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8490,7 +8629,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8506,7 +8645,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22676,5 +22815,4 @@ } ], "log": [] -} - +} \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/include/oven-modes.h b/examples/all-clusters-app/all-clusters-common/include/oven-modes.h new file mode 100644 index 00000000000000..7e264a4c47e272 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/oven-modes.h @@ -0,0 +1,106 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace OvenMode { + +const uint8_t ModeBake = 0; +const uint8_t ModeConvection = 1; +const uint8_t ModeGrill = 2; +const uint8_t ModeRoast = 3; +const uint8_t ModeClean = 4; +const uint8_t ModeConvectionBake = 5; +const uint8_t ModeConvectionRoast = 6; +const uint8_t ModeWarming = 7; +const uint8_t ModeProofing = 8; + +/// This is an application level delegate to handle Oven commands according to the specific business logic. +class OvenModeDelegate : public ModeBase::Delegate +{ +private: + using ModeTagStructType = detail::Structs::ModeTagStruct::Type; + ModeTagStructType ModeTagsBake[1] = { { .value = to_underlying(ModeTag::kBake) } }; + ModeTagStructType ModeTagsConvection[1] = { { .value = to_underlying(ModeTag::kConvection) } }; + ModeTagStructType ModeTagsGrill[1] = { { .value = to_underlying(ModeTag::kGrill) } }; + ModeTagStructType ModeTagsRoast[1] = { { .value = to_underlying(ModeTag::kRoast) } }; + ModeTagStructType ModeTagsClean[1] = { { .value = to_underlying(ModeTag::kClean) } }; + ModeTagStructType ModeTagsConvectionBake[1] = { { .value = to_underlying(ModeTag::kConvectionBake) } }; + ModeTagStructType ModeTagsConvectionRoast[1] = { { .value = to_underlying(ModeTag::kConvectionRoast) } }; + ModeTagStructType ModeTagsWarming[1] = { { .value = to_underlying(ModeTag::kWarming) } }; + ModeTagStructType ModeTagsProofing[1] = { { .value = to_underlying(ModeTag::kProofing) } }; + + const detail::Structs::ModeOptionStruct::Type kModeOptions[9] = { + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Bake"), + .mode = ModeBake, + .modeTags = DataModel::List(ModeTagsBake) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Convection"), + .mode = ModeConvection, + .modeTags = DataModel::List(ModeTagsConvection) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Grill"), + .mode = ModeGrill, + .modeTags = DataModel::List(ModeTagsGrill) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Roast"), + .mode = ModeRoast, + .modeTags = DataModel::List(ModeTagsRoast) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Clean"), + .mode = ModeClean, + .modeTags = DataModel::List(ModeTagsClean) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Convection Bake"), + .mode = ModeConvectionBake, + .modeTags = DataModel::List(ModeTagsConvectionBake) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Convection Roast"), + .mode = ModeConvectionRoast, + .modeTags = DataModel::List(ModeTagsConvectionRoast) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Warming"), + .mode = ModeWarming, + .modeTags = DataModel::List(ModeTagsWarming) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Proofing"), + .mode = ModeProofing, + .modeTags = DataModel::List(ModeTagsProofing) }, + }; + + CHIP_ERROR Init() override; + void HandleChangeToMode(uint8_t mode, ModeBase::Commands::ChangeToModeResponse::Type & response) override; + + CHIP_ERROR GetModeLabelByIndex(uint8_t modeIndex, MutableCharSpan & label) override; + CHIP_ERROR GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) override; + CHIP_ERROR GetModeTagsByIndex(uint8_t modeIndex, DataModel::List & tags) override; + +public: + ~OvenModeDelegate() override = default; +}; + +ModeBase::Instance * Instance(); + +void Shutdown(); + +} // namespace OvenMode +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp new file mode 100644 index 00000000000000..017f6b8eae2ac7 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp @@ -0,0 +1,107 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ +#include +#include + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::OvenMode; +using chip::Protocols::InteractionModel::Status; +template +using List = chip::app::DataModel::List; +using ModeTagStructType = chip::app::Clusters::detail::Structs::ModeTagStruct::Type; + +// RVC Run + +static OvenModeDelegate * gOvenModeDelegate = nullptr; +static ModeBase::Instance * gOvenModeInstance = nullptr; + +CHIP_ERROR OvenModeDelegate::Init() +{ + return CHIP_NO_ERROR; +} + +void OvenModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response) +{ + response.status = to_underlying(ModeBase::StatusCode::kSuccess); +} + +CHIP_ERROR OvenModeDelegate::GetModeLabelByIndex(uint8_t modeIndex, chip::MutableCharSpan & label) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(kModeOptions[modeIndex].label, label); +} + +CHIP_ERROR OvenModeDelegate::GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + value = kModeOptions[modeIndex].mode; + return CHIP_NO_ERROR; +} + +CHIP_ERROR OvenModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, List & tags) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + + if (tags.size() < kModeOptions[modeIndex].modeTags.size()) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + std::copy(kModeOptions[modeIndex].modeTags.begin(), kModeOptions[modeIndex].modeTags.end(), tags.begin()); + tags.reduce_size(kModeOptions[modeIndex].modeTags.size()); + + return CHIP_NO_ERROR; +} + +ModeBase::Instance * OvenMode::Instance() +{ + return gOvenModeInstance; +} + +void OvenMode::Shutdown() +{ + if (gOvenModeInstance != nullptr) + { + delete gOvenModeInstance; + gOvenModeInstance = nullptr; + } + if (gOvenModeDelegate != nullptr) + { + delete gOvenModeDelegate; + gOvenModeDelegate = nullptr; + } +} + +void emberAfOvenModeClusterInitCallback(chip::EndpointId endpointId) +{ + VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. + VerifyOrDie(gOvenModeDelegate == nullptr && gOvenModeInstance == nullptr); + gOvenModeDelegate = new OvenMode::OvenModeDelegate; + gOvenModeInstance = + new ModeBase::Instance(gOvenModeDelegate, 0x1, OvenMode::Id, chip::to_underlying(OvenMode::Feature::kOnOff)); + gOvenModeInstance->Init(); +} diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index 2ba95602857620..e68398afdf625d 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -158,6 +158,7 @@ list( ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index 4774d48e93952c..1c23617af66262 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -76,6 +76,7 @@ asr_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn index f861549db2fcac..26c0f67e389a0c 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -81,6 +81,7 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index 5bb01459551d91..e9492d7a223f42 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -84,6 +84,7 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index d1b795e47d1e99..c5d40048308c2d 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -56,6 +56,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/color-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/mode-select-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/mode-base-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/low-power-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-server" diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index f406b3ac5d6eab..f4469b9c7bc290 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -112,6 +112,7 @@ psoc6_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 8c69395887af7b..2da7e0c8900f3d 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include using namespace chip; diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 6feba8becbe31b..343372676bd8fc 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -34,6 +34,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/microwave-oven-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index bf47dae4646b4b..05435df44e81b8 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -26,6 +26,7 @@ #include "laundry-washer-mode.h" #include "microwave-oven-mode.h" #include "operational-state-delegate-impl.h" +#include "oven-modes.h" #include "resource-monitoring-delegates.h" #include "rvc-modes.h" #include "tcc-mode.h" @@ -237,6 +238,7 @@ void ApplicationShutdown() Clusters::AirQuality::Shutdown(); Clusters::OperationalState::Shutdown(); Clusters::RvcOperationalState::Shutdown(); + Clusters::OvenMode::Shutdown(); if (sChipNamedPipeCommands.Stop() != CHIP_NO_ERROR) { diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 7a240a57dc8424..28104e85f0c3b1 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -66,6 +66,7 @@ target_sources(${APP_TARGET} PRIVATE ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON}/src/energy-evse-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/oven-modes.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index f9d635bdd2c3a9..48499c29712d40 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -63,6 +63,7 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/oven-modes.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index 89c8b05b9a842e..01bba26479a7af 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -80,6 +80,7 @@ mw320_executable("shell_mw320") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt index 6f8b679f52a52b..60b5bdddf40740 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -59,6 +59,7 @@ target_sources(${APP_TARGET} ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/oven-modes.cpp ${ALL_CLUSTERS_COMMON}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index 6af51a7f176b8a..202d288f87053c 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -29,6 +29,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index 8c8300d9c20e4a..c0b473cbb5317c 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -23,6 +23,7 @@ CommandHandlerInterfaceOnlyClusters: - RVC Clean Mode - Dishwasher Mode - Laundry Washer Mode + - Oven Mode - Refrigerator And Temperature Controlled Cabinet Mode - Operational State - Activated Carbon Filter Monitoring diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 8c4f088f118554..98c475d608864e 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -157,6 +157,7 @@ void MatterLaundryWasherModePluginServerInitCallback() {} void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallback() {} void MatterOperationalStatePluginServerInitCallback() {} void MatterRvcOperationalStatePluginServerInitCallback() {} +void MatterOvenModePluginServerInitCallback() {} void MatterDishwasherAlarmPluginServerInitCallback() {} void MatterBooleanStateConfigurationPluginServerInitCallback() {} void MatterValveConfigurationAndControlPluginServerInitCallback() {} diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index b530fd8f277f05..53ce1b49183816 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../app/zap-templates/zcl/zcl.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index c05bdd7f5dbb87..eaed7122247be7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -5452,12 +5452,6 @@ bool emberAfOvenCavityOperationalStateClusterStartCallback( bool emberAfOvenCavityOperationalStateClusterResumeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::DecodableType & commandData); -/** - * @brief Oven Mode Cluster ChangeToMode Command callback (from client) - */ -bool emberAfOvenModeClusterChangeToModeCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OvenMode::Commands::ChangeToMode::DecodableType & commandData); /** * @brief Mode Select Cluster ChangeToMode Command callback (from client) */