From e173300fe44bcaaf0e522d384d67685982d4c43f Mon Sep 17 00:00:00 2001 From: Paul Zander <69502639+pjzander-signify@users.noreply.github.com> Date: Mon, 25 Oct 2021 18:35:41 +0200 Subject: [PATCH] Add Bridged Actions Cluster (#10694) (#10838) * Add Bridged Actions Cluster * Replace OCTET_STRING with now supported CHAR_STRING --- .../all-clusters-common/all-clusters-app.zap | 194 ++++ .../esp32/main/DeviceCallbacks.cpp | 100 ++ examples/all-clusters-app/linux/main.cpp | 100 ++ .../chip/bridged-actions-cluster.xml | 176 ++++ src/app/zap-templates/zcl/zcl.json | 1 + src/app/zap_cluster_list.py | 2 + .../data_model/controller-clusters.zap | 194 ++++ .../java/zap-generated/CHIPClusters-JNI.cpp | 864 ++++++++++++++++++ .../chip/devicecontroller/ChipClusters.java | 200 ++++ .../python/chip/clusters/CHIPClusters.cpp | 259 ++++++ .../python/chip/clusters/CHIPClusters.py | 268 ++++++ .../python/chip/clusters/Objects.py | 377 ++++++++ .../CHIP/zap-generated/CHIPCallbackBridge.mm | 47 + .../CHIPCallbackBridge_internal.h | 28 + .../CHIP/zap-generated/CHIPClustersObjc.h | 44 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 138 +++ .../zap-generated/CHIPClustersObjc_internal.h | 4 + .../CHIP/zap-generated/CHIPTestClustersObjc.h | 11 + .../zap-generated/CHIPTestClustersObjc.mm | 27 + .../Framework/CHIPTests/CHIPClustersTests.m | 74 ++ .../zap-generated/IMClusterCommandHandler.cpp | 142 +++ .../PluginApplicationCallbacks.h | 1 + .../zap-generated/attribute-size.cpp | 89 ++ .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 597 +++++++----- .../zap-generated/gen_config.h | 6 + .../app-common/zap-generated/af-structs.h | 20 + .../app-common/zap-generated/attribute-id.h | 9 + .../zap-generated/attributes/Accessors.cpp | 6 + .../zap-generated/attributes/Accessors.h | 6 + .../app-common/zap-generated/callback.h | 186 ++++ .../zap-generated/callbacks/PluginCallbacks.h | 3 + .../app-common/zap-generated/cluster-id.h | 3 + .../zap-generated/cluster-objects.cpp | 591 ++++++++++++ .../zap-generated/cluster-objects.h | 553 +++++++++++ .../app-common/zap-generated/command-id.h | 14 + .../app-common/zap-generated/enums.h | 60 ++ .../app-common/zap-generated/ids/Attributes.h | 22 + .../app-common/zap-generated/ids/Clusters.h | 3 + .../app-common/zap-generated/ids/Commands.h | 54 ++ .../app-common/zap-generated/print-cluster.h | 7 + .../zap-generated/cluster/Commands.h | 587 ++++++++++++ .../zap-generated/CHIPClientCallbacks.cpp | 48 + .../zap-generated/CHIPClientCallbacks.h | 12 + .../zap-generated/CHIPClusters.cpp | 646 +++++++++++++ .../zap-generated/CHIPClusters.h | 41 + .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 106 ++- .../zap-generated/gen_config.h | 5 + .../zap-generated/tests/CHIPClustersTest.cpp | 35 + .../zap-generated/tests/CHIPClustersTest.h | 12 + 52 files changed, 6708 insertions(+), 281 deletions(-) create mode 100644 src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml 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 e194b2402332c5..0f24e45b475978 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 @@ -7814,6 +7814,200 @@ } ] }, + { + "name": "Bridged Actions", + "code": 37, + "mfgCode": null, + "define": "BRIDGED_ACTIONS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "InstantAction", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "InstantActionWithTransition", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StartAction", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StartActionWithDuration", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopAction", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "PauseAction", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "PauseActionWithDuration", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ResumeAction", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableAction", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableActionWithDuration", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableAction", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableActionWithDuration", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Bridged Actions", + "code": 37, + "mfgCode": null, + "define": "BRIDGED_ACTIONS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "action list", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "endpoint list", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "setup url", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "www.signify.com", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Basic", "code": 40, diff --git a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp index 9c6f54421bbe9b..e38bf0a3eb7452 100644 --- a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp @@ -32,7 +32,9 @@ #include "esp_log.h" #include #include +#include #include +#include #include #include #include @@ -247,3 +249,101 @@ bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::Command * commandObj) emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); return true; } + +// Stub implementation of the Bridged Action Cluster functions + +bool emberAfBridgedActionsClusterDisableActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::DisableAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterDisableActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterEnableActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::EnableAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterEnableActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterInstantActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::InstantAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterInstantActionWithTransitionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterPauseActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::PauseAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterPauseActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterResumeActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::ResumeAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterStartActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StartAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterStartActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterStopActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StopAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} diff --git a/examples/all-clusters-app/linux/main.cpp b/examples/all-clusters-app/linux/main.cpp index 8884a9bddc0341..2fc22257a3de4d 100644 --- a/examples/all-clusters-app/linux/main.cpp +++ b/examples/all-clusters-app/linux/main.cpp @@ -16,7 +16,9 @@ * limitations under the License. */ +#include #include +#include #include #include "AppMain.h" @@ -27,6 +29,104 @@ bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::Command * commandObj) return true; } +// Stub implementation of the Bridged Action Cluster functions + +bool emberAfBridgedActionsClusterDisableActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::DisableAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterDisableActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterEnableActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::EnableAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterEnableActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterInstantActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::InstantAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterInstantActionWithTransitionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterPauseActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::PauseAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterPauseActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterResumeActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::ResumeAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterStartActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StartAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterStartActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +bool emberAfBridgedActionsClusterStopActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StopAction::DecodableType & commandData) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml new file mode 100644 index 00000000000000..e1f13d4bc8a8ad --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/bridged-actions-cluster.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + General + Bridged Actions + 0x0025 + BRIDGED_ACTIONS_CLUSTER + This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. + + action list + endpoint list + setup url + + + This command triggers an action (state change) on the involved endpoints. + + + + + + This command triggers an action (state change) on the involved endpoints, with a specified time to transition from the current state to the new state. + + + + + + + This command triggers the commencement of an action on the involved endpoints. + + + + + + This command triggers the commencement of an action (with a duration) on the involved endpoints. + + + + + + + This command stops the ongoing action on the involved endpoints. + + + + + + This command pauses an ongoing action. + + + + + + This command pauses an ongoing action with a duration. + + + + + + + This command resumes a previously paused action. + + + + + + This command enables a certain action or automation. + + + + + + This command enables a certain action or automation with a duration. + + + + + + + This command disables a certain action or automation. + + + + + + This command disables a certain action or automation with a duration. + + + + + + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 33b491eb267e7d..3f3fbc51f7d692 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -10,6 +10,7 @@ "basic-information-cluster.xml", "binding-cluster.xml", "boolean-state-cluster.xml", + "bridged-actions-cluster.xml", "bridged-device-basic.xml", "chip-devices.xml", "chip-ota.xml", diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index 40716447d83b7d..ba3eb7352d8802 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -20,6 +20,7 @@ 'BINARY_INPUT_BASIC_CLUSTER': [], 'BINDING_CLUSTER': ['bindings'], 'BOOLEAN_STATE_CLUSTER': [], + 'BRIDGED_ACTIONS_CLUSTER': [], 'BRIDGED_DEVICE_BASIC_CLUSTER': [], 'COLOR_CONTROL_CLUSTER': ['color-control-server'], 'COMMISSIONING_CLUSTER': [], @@ -85,6 +86,7 @@ 'BINARY_INPUT_BASIC_CLUSTER': [], 'BINDING_CLUSTER': [], 'BOOLEAN_STATE_CLUSTER': [], + 'BRIDGED_ACTIONS_CLUSTER': [], 'BRIDGED_DEVICE_BASIC_CLUSTER': [], 'COLOR_CONTROL_CLUSTER': [], 'COMMISSIONING_CLUSTER': [], diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 4520939c4ba982..c98e102cc78739 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1343,6 +1343,200 @@ } ] }, + { + "name": "Bridged Actions", + "code": 37, + "mfgCode": null, + "define": "BRIDGED_ACTIONS_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "InstantAction", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "InstantActionWithTransition", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StartAction", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StartActionWithDuration", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopAction", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "PauseAction", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "PauseActionWithDuration", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ResumeAction", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableAction", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableActionWithDuration", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableAction", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableActionWithDuration", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Bridged Actions", + "code": 37, + "mfgCode": null, + "define": "BRIDGED_ACTIONS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "action list", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "endpoint list", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "setup url", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "www.signify.com", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Basic", "code": 40, diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 78bc4bd72958d8..9bfe5c129c5240 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -6205,6 +6205,194 @@ class CHIPAudioOutputAudioOutputListAttributeCallback : public Callback::Callbac jobject javaCallbackRef; }; +class CHIPBridgedActionsActionListAttributeCallback : public Callback::Callback +{ +public: + CHIPBridgedActionsActionListAttributeCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) + { + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) + { + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context)); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute")); + JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(ILjava/lang/String;IIII)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ActionListAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + jint actionID = entry.actionID; + UtfString nameStr(env, entry.name); + jstring name(nameStr.jniValue()); + jint type = entry.type; + jint endpointListID = entry.endpointListID; + jint supportedCommands = entry.supportedCommands; + jint status = entry.status; + + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, actionID, name, type, endpointListID, supportedCommands, status); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ActionListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ActionListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + } + +private: + jobject javaCallbackRef; +}; + +class CHIPBridgedActionsEndpointListAttributeCallback : public Callback::Callback +{ +public: + CHIPBridgedActionsEndpointListAttributeCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) + { + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) + { + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context)); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, + "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute")); + JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(ILjava/lang/String;I[B)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find EndpointListAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + jint endpointListID = entry.endpointListID; + UtfString nameStr(env, entry.name); + jstring name(nameStr.jniValue()); + jint type = entry.type; + jbyteArray endpoints = env->NewByteArray(entry.endpoints.size()); + env->SetByteArrayRegion(endpoints, 0, entry.endpoints.size(), reinterpret_cast(entry.endpoints.data())); + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, endpointListID, name, type, endpoints); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create EndpointListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding EndpointListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + } + +private: + jobject javaCallbackRef; +}; + class CHIPContentLauncherAcceptsHeaderListAttributeCallback : public Callback::Callback { @@ -10582,6 +10770,682 @@ JNI_METHOD(void, BooleanStateCluster, readClusterRevisionAttribute)(JNIEnv * env onSuccess.release(); onFailure.release(); } +JNI_METHOD(jlong, BridgedActionsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + BridgedActionsCluster * cppCluster = new BridgedActionsCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, BridgedActionsCluster, disableAction) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->DisableAction(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID, jlong duration) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->DisableActionWithDuration(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID, duration); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, enableAction) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->EnableAction(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID, jlong duration) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->EnableActionWithDuration(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID, duration); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, instantAction) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->InstantAction(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID, jint transitionTime) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->InstantActionWithTransition(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID, transitionTime); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, pauseAction) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->PauseAction(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID, jlong duration) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->PauseActionWithDuration(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID, duration); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, resumeAction) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->ResumeAction(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, startAction) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->StartAction(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID, jlong duration) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->StartActionWithDuration(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID, duration); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} +JNI_METHOD(void, BridgedActionsCluster, stopAction) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint actionID, jlong invokeID) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrExit(onSuccess.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(onFailure.get() != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrExit(cppCluster != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + err = cppCluster->StopAction(onSuccess->Cancel(), onFailure->Cancel(), actionID, invokeID); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + jthrowable exception; + jmethodID method; + + err = JniReferences::GetInstance().FindMethod(env, callback, "onError", "(Ljava/lang/Exception;)V", &method); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + + err = CreateIllegalStateException(env, "Error invoking cluster", err, exception); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Error throwing IllegalStateException %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + env->CallVoidMethod(callback, method, exception); + } + else + { + onSuccess.release(); + onFailure.release(); + } +} + +JNI_METHOD(void, BridgedActionsCluster, readActionListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeActionList(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, BridgedActionsCluster, readEndpointListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeEndpointList(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, BridgedActionsCluster, readSetupUrlAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, false), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeSetupUrl(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, BridgedActionsCluster, readClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + err = cppCluster->ReadAttributeClusterRevision(onSuccess->Cancel(), onFailure->Cancel()); + VerifyOrReturn(err == CHIP_NO_ERROR, ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, BridgedDeviceBasicCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 6bc8d40bd37441..f3b3c78180fff6 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -808,6 +808,206 @@ private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); } + public static class BridgedActionsCluster extends BaseChipCluster { + public BridgedActionsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + public static long clusterId() { + return Long.parseUnsignedLong("37"); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void disableAction(DefaultClusterCallback callback, int actionID, long invokeID) { + disableAction(chipClusterPtr, callback, actionID, invokeID); + } + + public void disableActionWithDuration( + DefaultClusterCallback callback, int actionID, long invokeID, long duration) { + disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + } + + public void enableAction(DefaultClusterCallback callback, int actionID, long invokeID) { + enableAction(chipClusterPtr, callback, actionID, invokeID); + } + + public void enableActionWithDuration( + DefaultClusterCallback callback, int actionID, long invokeID, long duration) { + enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + } + + public void instantAction(DefaultClusterCallback callback, int actionID, long invokeID) { + instantAction(chipClusterPtr, callback, actionID, invokeID); + } + + public void instantActionWithTransition( + DefaultClusterCallback callback, int actionID, long invokeID, int transitionTime) { + instantActionWithTransition(chipClusterPtr, callback, actionID, invokeID, transitionTime); + } + + public void pauseAction(DefaultClusterCallback callback, int actionID, long invokeID) { + pauseAction(chipClusterPtr, callback, actionID, invokeID); + } + + public void pauseActionWithDuration( + DefaultClusterCallback callback, int actionID, long invokeID, long duration) { + pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + } + + public void resumeAction(DefaultClusterCallback callback, int actionID, long invokeID) { + resumeAction(chipClusterPtr, callback, actionID, invokeID); + } + + public void startAction(DefaultClusterCallback callback, int actionID, long invokeID) { + startAction(chipClusterPtr, callback, actionID, invokeID); + } + + public void startActionWithDuration( + DefaultClusterCallback callback, int actionID, long invokeID, long duration) { + startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration); + } + + public void stopAction(DefaultClusterCallback callback, int actionID, long invokeID) { + stopAction(chipClusterPtr, callback, actionID, invokeID); + } + + private native void disableAction( + long chipClusterPtr, DefaultClusterCallback callback, int actionID, long invokeID); + + private native void disableActionWithDuration( + long chipClusterPtr, + DefaultClusterCallback callback, + int actionID, + long invokeID, + long duration); + + private native void enableAction( + long chipClusterPtr, DefaultClusterCallback callback, int actionID, long invokeID); + + private native void enableActionWithDuration( + long chipClusterPtr, + DefaultClusterCallback callback, + int actionID, + long invokeID, + long duration); + + private native void instantAction( + long chipClusterPtr, DefaultClusterCallback callback, int actionID, long invokeID); + + private native void instantActionWithTransition( + long chipClusterPtr, + DefaultClusterCallback callback, + int actionID, + long invokeID, + int transitionTime); + + private native void pauseAction( + long chipClusterPtr, DefaultClusterCallback callback, int actionID, long invokeID); + + private native void pauseActionWithDuration( + long chipClusterPtr, + DefaultClusterCallback callback, + int actionID, + long invokeID, + long duration); + + private native void resumeAction( + long chipClusterPtr, DefaultClusterCallback callback, int actionID, long invokeID); + + private native void startAction( + long chipClusterPtr, DefaultClusterCallback callback, int actionID, long invokeID); + + private native void startActionWithDuration( + long chipClusterPtr, + DefaultClusterCallback callback, + int actionID, + long invokeID, + long duration); + + private native void stopAction( + long chipClusterPtr, DefaultClusterCallback callback, int actionID, long invokeID); + + public static class ActionListAttribute { + public int actionID; + public String name; + public int type; + public int endpointListID; + public int supportedCommands; + public int status; + + public ActionListAttribute( + int actionID, + String name, + int type, + int endpointListID, + int supportedCommands, + int status) { + this.actionID = actionID; + this.name = name; + this.type = type; + this.endpointListID = endpointListID; + this.supportedCommands = supportedCommands; + this.status = status; + } + } + + public interface ActionListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public static class EndpointListAttribute { + public int endpointListID; + public String name; + public int type; + public byte[] endpoints; + + public EndpointListAttribute(int endpointListID, String name, int type, byte[] endpoints) { + this.endpointListID = endpointListID; + this.name = name; + this.type = type; + this.endpoints = endpoints; + } + } + + public interface EndpointListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readActionListAttribute(ActionListAttributeCallback callback) { + readActionListAttribute(chipClusterPtr, callback); + } + + public void readEndpointListAttribute(EndpointListAttributeCallback callback) { + readEndpointListAttribute(chipClusterPtr, callback); + } + + public void readSetupUrlAttribute(CharStringAttributeCallback callback) { + readSetupUrlAttribute(chipClusterPtr, callback); + } + + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + + private native void readActionListAttribute( + long chipClusterPtr, ActionListAttributeCallback callback); + + private native void readEndpointListAttribute( + long chipClusterPtr, EndpointListAttributeCallback callback); + + private native void readSetupUrlAttribute( + long chipClusterPtr, CharStringAttributeCallback callback); + + private native void readClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + } + public static class BridgedDeviceBasicCluster extends BaseChipCluster { public BridgedDeviceBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index eabbac2decd5b2..0439f789d3ef62 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -198,6 +198,103 @@ static void OnAudioOutputAudioOutputListListAttributeResponse( chip::Callback::Callback gAudioOutputAudioOutputListListAttributeCallback{ OnAudioOutputAudioOutputListListAttributeResponse, nullptr }; +static void OnBridgedActionsActionListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + uint16_t count = 0; + auto iter = list.begin(); + while (iter.Next()) + { + ++count; + } + if (iter.GetStatus() != CHIP_NO_ERROR) + { + if (gFailureResponseDelegate != nullptr) + { + gFailureResponseDelegate(EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + ChipLogProgress(Zcl, " attributeValue:%s", count > 0 ? "" : " []"); + + if (count > 0) + ChipLogProgress(Zcl, " ["); + + iter = list.begin(); + while (iter.Next()) + { +#if CHIP_PROGRESS_LOGGING + auto & entry = iter.GetValue(); +#endif // CHIP_PROGRESS_LOGGING + ChipLogProgress(Zcl, " {"); + ChipLogProgress(Zcl, " ActionID: %" PRIu16 ",", entry.actionID); + ChipLogProgress(Zcl, " Name: %.*s,", static_cast(entry.name.size()), entry.name.data()); + ChipLogProgress(Zcl, " Type: %" PRIu8 ",", entry.type); + ChipLogProgress(Zcl, " EndpointListID: %" PRIu16 ",", entry.endpointListID); + ChipLogProgress(Zcl, " SupportedCommands: %" PRIu16 ",", entry.supportedCommands); + ChipLogProgress(Zcl, " Status: %" PRIu8 ",", entry.status); + ChipLogProgress(Zcl, " },"); + } + + if (count > 0) + ChipLogProgress(Zcl, " ]"); + + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gBridgedActionsActionListListAttributeCallback{ + OnBridgedActionsActionListListAttributeResponse, nullptr +}; +static void OnBridgedActionsEndpointListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + uint16_t count = 0; + auto iter = list.begin(); + while (iter.Next()) + { + ++count; + } + if (iter.GetStatus() != CHIP_NO_ERROR) + { + if (gFailureResponseDelegate != nullptr) + { + gFailureResponseDelegate(EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + ChipLogProgress(Zcl, " attributeValue:%s", count > 0 ? "" : " []"); + + if (count > 0) + ChipLogProgress(Zcl, " ["); + + iter = list.begin(); + while (iter.Next()) + { +#if CHIP_PROGRESS_LOGGING + auto & entry = iter.GetValue(); +#endif // CHIP_PROGRESS_LOGGING + ChipLogProgress(Zcl, " {"); + ChipLogProgress(Zcl, " EndpointListID: %" PRIu16 ",", entry.endpointListID); + ChipLogProgress(Zcl, " Name: %.*s,", static_cast(entry.name.size()), entry.name.data()); + ChipLogProgress(Zcl, " Type: %" PRIu8 ",", entry.type); + ChipLogProgress(Zcl, " Endpoints: %s,", ByteSpanToString(entry.endpoints).c_str()); + ChipLogProgress(Zcl, " },"); + } + + if (count > 0) + ChipLogProgress(Zcl, " ]"); + + if (gSuccessResponseDelegate != nullptr) + gSuccessResponseDelegate(); +} +chip::Callback::Callback gBridgedActionsEndpointListListAttributeCallback{ + OnBridgedActionsEndpointListListAttributeResponse, nullptr +}; static void OnContentLauncherAcceptsHeaderListListAttributeResponse(void * context, const chip::app::DataModel::DecodableList & list) @@ -2178,6 +2275,168 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_ClusterRevision } // End of Cluster BooleanState +// Cluster BridgedActions + +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableAction(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t actionID, uint32_t invokeID) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.DisableAction(nullptr, nullptr, actionID, invokeID).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableActionWithDuration(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.DisableActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableAction(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t actionID, uint32_t invokeID) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.EnableAction(nullptr, nullptr, actionID, invokeID).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableActionWithDuration(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.EnableActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantAction(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t actionID, uint32_t invokeID) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.InstantAction(nullptr, nullptr, actionID, invokeID).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantActionWithTransition(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t actionID, + uint32_t invokeID, + uint16_t transitionTime) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.InstantActionWithTransition(nullptr, nullptr, actionID, invokeID, transitionTime).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseAction(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t actionID, uint32_t invokeID) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.PauseAction(nullptr, nullptr, actionID, invokeID).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseActionWithDuration(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.PauseActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_ResumeAction(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t actionID, uint32_t invokeID) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ResumeAction(nullptr, nullptr, actionID, invokeID).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartAction(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t actionID, uint32_t invokeID) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.StartAction(nullptr, nullptr, actionID, invokeID).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartActionWithDuration(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.StartActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); +} +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StopAction(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, chip::GroupId, + uint16_t actionID, uint32_t invokeID) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.StopAction(nullptr, nullptr, actionID, invokeID).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ActionList(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeActionList(gBridgedActionsActionListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_EndpointList(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster + .ReadAttributeEndpointList(gBridgedActionsEndpointListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) + .AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_SetupUrl(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeSetupUrl(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ClusterRevision(chip::Controller::Device * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) +{ + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, ZCLendpointId); + return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); +} + +// End of Cluster BridgedActions // Cluster BridgedDeviceBasic chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(chip::Controller::Device * device, diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index b8765c5e430339..30ec4750eb3f27 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -468,6 +468,135 @@ class ChipClusters: }, }, } + _BRIDGED_ACTIONS_CLUSTER_INFO = { + "clusterName": "BridgedActions", + "clusterId": 0x00000025, + "commands": { + 0x0000000A: { + "commandId": 0x0000000A, + "commandName": "DisableAction", + "args": { + "actionID": "int", + "invokeID": "int", + }, + }, + 0x0000000B: { + "commandId": 0x0000000B, + "commandName": "DisableActionWithDuration", + "args": { + "actionID": "int", + "invokeID": "int", + "duration": "int", + }, + }, + 0x00000008: { + "commandId": 0x00000008, + "commandName": "EnableAction", + "args": { + "actionID": "int", + "invokeID": "int", + }, + }, + 0x00000009: { + "commandId": 0x00000009, + "commandName": "EnableActionWithDuration", + "args": { + "actionID": "int", + "invokeID": "int", + "duration": "int", + }, + }, + 0x00000000: { + "commandId": 0x00000000, + "commandName": "InstantAction", + "args": { + "actionID": "int", + "invokeID": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "InstantActionWithTransition", + "args": { + "actionID": "int", + "invokeID": "int", + "transitionTime": "int", + }, + }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "PauseAction", + "args": { + "actionID": "int", + "invokeID": "int", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "PauseActionWithDuration", + "args": { + "actionID": "int", + "invokeID": "int", + "duration": "int", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "ResumeAction", + "args": { + "actionID": "int", + "invokeID": "int", + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "StartAction", + "args": { + "actionID": "int", + "invokeID": "int", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "StartActionWithDuration", + "args": { + "actionID": "int", + "invokeID": "int", + "duration": "int", + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "StopAction", + "args": { + "actionID": "int", + "invokeID": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "ActionList", + "attributeId": 0x00000000, + "type": "", + }, + 0x00000001: { + "attributeName": "EndpointList", + "attributeId": 0x00000001, + "type": "", + }, + 0x00000002: { + "attributeName": "SetupUrl", + "attributeId": 0x00000002, + "type": "str", + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + }, + }, + } _BRIDGED_DEVICE_BASIC_CLUSTER_INFO = { "clusterName": "BridgedDeviceBasic", "clusterId": 0x00000039, @@ -4057,6 +4186,7 @@ class ChipClusters: 0x0000000F: _BINARY_INPUT_BASIC_CLUSTER_INFO, 0x0000F000: _BINDING_CLUSTER_INFO, 0x00000045: _BOOLEAN_STATE_CLUSTER_INFO, + 0x00000025: _BRIDGED_ACTIONS_CLUSTER_INFO, 0x00000039: _BRIDGED_DEVICE_BASIC_CLUSTER_INFO, 0x00000300: _COLOR_CONTROL_CLUSTER_INFO, 0x0000050A: _CONTENT_LAUNCHER_CLUSTER_INFO, @@ -4114,6 +4244,7 @@ class ChipClusters: "BinaryInputBasic": _BINARY_INPUT_BASIC_CLUSTER_INFO, "Binding": _BINDING_CLUSTER_INFO, "BooleanState": _BOOLEAN_STATE_CLUSTER_INFO, + "BridgedActions": _BRIDGED_ACTIONS_CLUSTER_INFO, "BridgedDeviceBasic": _BRIDGED_DEVICE_BASIC_CLUSTER_INFO, "ColorControl": _COLOR_CONTROL_CLUSTER_INFO, "ContentLauncher": _CONTENT_LAUNCHER_CLUSTER_INFO, @@ -4302,6 +4433,66 @@ def ClusterBinding_CommandUnbind(self, device: ctypes.c_void_p, ZCLendpoint: int device, ZCLendpoint, ZCLgroupid, nodeId, groupId, endpointId, clusterId ) + def ClusterBridgedActions_CommandDisableAction(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_DisableAction( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID + ) + + def ClusterBridgedActions_CommandDisableActionWithDuration(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int, duration: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_DisableActionWithDuration( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID, duration + ) + + def ClusterBridgedActions_CommandEnableAction(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_EnableAction( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID + ) + + def ClusterBridgedActions_CommandEnableActionWithDuration(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int, duration: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_EnableActionWithDuration( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID, duration + ) + + def ClusterBridgedActions_CommandInstantAction(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_InstantAction( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID + ) + + def ClusterBridgedActions_CommandInstantActionWithTransition(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int, transitionTime: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_InstantActionWithTransition( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID, transitionTime + ) + + def ClusterBridgedActions_CommandPauseAction(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_PauseAction( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID + ) + + def ClusterBridgedActions_CommandPauseActionWithDuration(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int, duration: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_PauseActionWithDuration( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID, duration + ) + + def ClusterBridgedActions_CommandResumeAction(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_ResumeAction( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID + ) + + def ClusterBridgedActions_CommandStartAction(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_StartAction( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID + ) + + def ClusterBridgedActions_CommandStartActionWithDuration(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int, duration: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_StartActionWithDuration( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID, duration + ) + + def ClusterBridgedActions_CommandStopAction(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, actionID: int, invokeID: int): + return self._chipLib.chip_ime_AppendCommand_BridgedActions_StopAction( + device, ZCLendpoint, ZCLgroupid, actionID, invokeID + ) + def ClusterColorControl_CommandColorLoopSet(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, updateFlags: int, action: int, direction: int, time: int, startHue: int, optionsMask: int, optionsOverride: int): return self._chipLib.chip_ime_AppendCommand_ColorControl_ColorLoopSet( device, ZCLendpoint, ZCLgroupid, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride @@ -5241,6 +5432,18 @@ def ClusterBooleanState_SubscribeAttributeStateValue(self, device: ctypes.c_void def ClusterBooleanState_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_BooleanState_ClusterRevision(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedActions_ReadAttributeActionList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedActions_ActionList(device, ZCLendpoint, ZCLgroupid) + + def ClusterBridgedActions_ReadAttributeEndpointList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedActions_EndpointList(device, ZCLendpoint, ZCLgroupid) + + def ClusterBridgedActions_ReadAttributeSetupUrl(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedActions_SetupUrl(device, ZCLendpoint, ZCLgroupid) + + def ClusterBridgedActions_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): + return self._chipLib.chip_ime_ReadAttribute_BridgedActions_ClusterRevision(device, ZCLendpoint, ZCLgroupid) + def ClusterBridgedDeviceBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(device, ZCLendpoint, ZCLgroupid) @@ -6982,6 +7185,71 @@ def InitLib(self, chipLib): self._chipLib.chip_ime_ReadAttribute_BooleanState_ClusterRevision.argtypes = [ ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] self._chipLib.chip_ime_ReadAttribute_BooleanState_ClusterRevision.restype = ctypes.c_uint32 + # Cluster BridgedActions + # Cluster BridgedActions Command DisableAction + self._chipLib.chip_ime_AppendCommand_BridgedActions_DisableAction.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_DisableAction.restype = ctypes.c_uint32 + # Cluster BridgedActions Command DisableActionWithDuration + self._chipLib.chip_ime_AppendCommand_BridgedActions_DisableActionWithDuration.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_DisableActionWithDuration.restype = ctypes.c_uint32 + # Cluster BridgedActions Command EnableAction + self._chipLib.chip_ime_AppendCommand_BridgedActions_EnableAction.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_EnableAction.restype = ctypes.c_uint32 + # Cluster BridgedActions Command EnableActionWithDuration + self._chipLib.chip_ime_AppendCommand_BridgedActions_EnableActionWithDuration.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_EnableActionWithDuration.restype = ctypes.c_uint32 + # Cluster BridgedActions Command InstantAction + self._chipLib.chip_ime_AppendCommand_BridgedActions_InstantAction.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_InstantAction.restype = ctypes.c_uint32 + # Cluster BridgedActions Command InstantActionWithTransition + self._chipLib.chip_ime_AppendCommand_BridgedActions_InstantActionWithTransition.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_uint16] + self._chipLib.chip_ime_AppendCommand_BridgedActions_InstantActionWithTransition.restype = ctypes.c_uint32 + # Cluster BridgedActions Command PauseAction + self._chipLib.chip_ime_AppendCommand_BridgedActions_PauseAction.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_PauseAction.restype = ctypes.c_uint32 + # Cluster BridgedActions Command PauseActionWithDuration + self._chipLib.chip_ime_AppendCommand_BridgedActions_PauseActionWithDuration.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_PauseActionWithDuration.restype = ctypes.c_uint32 + # Cluster BridgedActions Command ResumeAction + self._chipLib.chip_ime_AppendCommand_BridgedActions_ResumeAction.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_ResumeAction.restype = ctypes.c_uint32 + # Cluster BridgedActions Command StartAction + self._chipLib.chip_ime_AppendCommand_BridgedActions_StartAction.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_StartAction.restype = ctypes.c_uint32 + # Cluster BridgedActions Command StartActionWithDuration + self._chipLib.chip_ime_AppendCommand_BridgedActions_StartActionWithDuration.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_StartActionWithDuration.restype = ctypes.c_uint32 + # Cluster BridgedActions Command StopAction + self._chipLib.chip_ime_AppendCommand_BridgedActions_StopAction.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32] + self._chipLib.chip_ime_AppendCommand_BridgedActions_StopAction.restype = ctypes.c_uint32 + # Cluster BridgedActions ReadAttribute ActionList + self._chipLib.chip_ime_ReadAttribute_BridgedActions_ActionList.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedActions_ActionList.restype = ctypes.c_uint32 + # Cluster BridgedActions ReadAttribute EndpointList + self._chipLib.chip_ime_ReadAttribute_BridgedActions_EndpointList.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedActions_EndpointList.restype = ctypes.c_uint32 + # Cluster BridgedActions ReadAttribute SetupUrl + self._chipLib.chip_ime_ReadAttribute_BridgedActions_SetupUrl.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedActions_SetupUrl.restype = ctypes.c_uint32 + # Cluster BridgedActions ReadAttribute ClusterRevision + self._chipLib.chip_ime_ReadAttribute_BridgedActions_ClusterRevision.argtypes = [ + ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] + self._chipLib.chip_ime_ReadAttribute_BridgedActions_ClusterRevision.restype = ctypes.c_uint32 # Cluster BridgedDeviceBasic # Cluster BridgedDeviceBasic ReadAttribute VendorName self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName.argtypes = [ diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 74050e2297472f..3dbd652af37e92 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -4138,6 +4138,383 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) +@dataclass +class BridgedActions: + id: typing.ClassVar[int] = 0x0025 + + class Enums: + class ActionErrorEnum(IntEnum): + kUnknown = 0x00 + kInterrupted = 0x01 + + class ActionStatusEnum(IntEnum): + kInactive = 0x00 + kActive = 0x01 + kPaused = 0x02 + kDisabled = 0x03 + + class ActionTypeEnum(IntEnum): + kOther = 0x00 + kScene = 0x01 + kSequence = 0x02 + kAutomation = 0x03 + kException = 0x04 + kNotification = 0x05 + kAlarm = 0x06 + + class EndpointListTypeEnum(IntEnum): + kOther = 0x00 + kRoom = 0x01 + kZone = 0x02 + + class Structs: + @dataclass + class ActionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="Name", Tag=1, Type=str), + ClusterObjectFieldDescriptor( + Label="Type", Tag=2, Type=BridgedActions.Enums.ActionTypeEnum), + ClusterObjectFieldDescriptor( + Label="EndpointListID", Tag=3, Type=uint), + ClusterObjectFieldDescriptor( + Label="SupportedCommands", Tag=4, Type=uint), + ClusterObjectFieldDescriptor( + Label="Status", Tag=5, Type=BridgedActions.Enums.ActionStatusEnum), + ]) + + ActionID: 'uint' = None + Name: 'str' = None + Type: 'BridgedActions.Enums.ActionTypeEnum' = None + EndpointListID: 'uint' = None + SupportedCommands: 'uint' = None + Status: 'BridgedActions.Enums.ActionStatusEnum' = None + + @dataclass + class EndpointListStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="EndpointListID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="Name", Tag=1, Type=str), + ClusterObjectFieldDescriptor( + Label="Type", Tag=2, Type=BridgedActions.Enums.EndpointListTypeEnum), + ClusterObjectFieldDescriptor( + Label="Endpoints", Tag=3, Type=bytes), + ]) + + EndpointListID: 'uint' = None + Name: 'str' = None + Type: 'BridgedActions.Enums.EndpointListTypeEnum' = None + Endpoints: 'bytes' = None + + class Commands: + @dataclass + class InstantAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + + @dataclass + class InstantActionWithTransition(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor( + Label="TransitionTime", Tag=2, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + TransitionTime: 'uint' = None + + @dataclass + class StartAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0002 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + + @dataclass + class StartActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0003 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor( + Label="Duration", Tag=2, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + Duration: 'uint' = None + + @dataclass + class StopAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0004 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + + @dataclass + class PauseAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0005 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + + @dataclass + class PauseActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0006 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor( + Label="Duration", Tag=2, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + Duration: 'uint' = None + + @dataclass + class ResumeAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0007 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + + @dataclass + class EnableAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0008 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + + @dataclass + class EnableActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x0009 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor( + Label="Duration", Tag=2, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + Duration: 'uint' = None + + @dataclass + class DisableAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x000A + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + + @dataclass + class DisableActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0025 + command_id: typing.ClassVar[int] = 0x000B + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor( + Label="ActionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor( + Label="InvokeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor( + Label="Duration", Tag=2, Type=uint), + ]) + + ActionID: 'uint' = None + InvokeID: 'uint' = None + Duration: 'uint' = None + + class Attributes: + class ActionList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=BridgedActions.Structs.ActionStruct, IsArray=True) + + class EndpointList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=BridgedActions.Structs.EndpointListStruct, IsArray=True) + + class SetupUrl(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0xFFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0xFFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + @dataclass class Basic: id: typing.ClassVar[int] = 0x0028 diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 38edb936b15a11..9861bbcf7f603f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -115,6 +115,53 @@ DispatchSuccess(context, @ { @"value" : array }); }; +void CHIPBridgedActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + id array = [[NSMutableArray alloc] init]; + auto iter = list.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + [array addObject:@ { + @"ActionID" : [NSNumber numberWithUnsignedShort:entry.actionID], + @"Name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], + @"Type" : [NSNumber numberWithUnsignedChar:entry.type], + @"EndpointListID" : [NSNumber numberWithUnsignedShort:entry.endpointListID], + @"SupportedCommands" : [NSNumber numberWithUnsignedShort:entry.supportedCommands], + @"Status" : [NSNumber numberWithUnsignedChar:entry.status], + }]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + + DispatchSuccess(context, @ { @"value" : array }); +}; + +void CHIPBridgedActionsEndpointListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + list) +{ + id array = [[NSMutableArray alloc] init]; + auto iter = list.begin(); + while (iter.Next()) { + auto & entry = iter.GetValue(); + [array addObject:@ { + @"EndpointListID" : [NSNumber numberWithUnsignedShort:entry.endpointListID], + @"Name" : [[NSString alloc] initWithBytes:entry.name.data() length:entry.name.size() encoding:NSUTF8StringEncoding], + @"Type" : [NSNumber numberWithUnsignedChar:entry.type], + @"Endpoints" : [NSData dataWithBytes:entry.endpoints.data() length:entry.endpoints.size()], + }]; + } + if (iter.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + + DispatchSuccess(context, @ { @"value" : array }); +}; + void CHIPContentLauncherAcceptsHeaderListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & list) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 7b3c4e37966142..685c53031bf3e7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -169,6 +169,34 @@ class CHIPAudioOutputAudioOutputListListAttributeCallbackBridge list); }; +class CHIPBridgedActionsActionListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPBridgedActionsActionListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + list); +}; + +class CHIPBridgedActionsEndpointListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPBridgedActionsEndpointListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + list); +}; + class CHIPContentLauncherAcceptsHeaderListListAttributeCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index dde244762bae98..0582d0ef0f6f76 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -260,6 +260,50 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Bridged Actions + * + */ +@interface CHIPBridgedActions : CHIPCluster + +- (void)disableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; +- (void)disableActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler; +- (void)enableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; +- (void)enableActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler; +- (void)instantAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; +- (void)instantActionWithTransition:(uint16_t)actionID + invokeID:(uint32_t)invokeID + transitionTime:(uint16_t)transitionTime + responseHandler:(ResponseHandler)responseHandler; +- (void)pauseAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; +- (void)pauseActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler; +- (void)resumeAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; +- (void)startAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; +- (void)startActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler; +- (void)stopAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeActionListWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeEndpointListWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeSetupUrlWithResponseHandler:(ResponseHandler)responseHandler; + +- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler; + +@end + /** * Cluster Bridged Device Basic * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index b6ac5ec6dfb83e..6d74b68c03638f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -666,6 +666,144 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Can @end +@implementation CHIPBridgedActions + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)disableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.DisableAction(success, failure, actionID, invokeID); + }); +} + +- (void)disableActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.DisableActionWithDuration(success, failure, actionID, invokeID, duration); + }); +} + +- (void)enableAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.EnableAction(success, failure, actionID, invokeID); + }); +} + +- (void)enableActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.EnableActionWithDuration(success, failure, actionID, invokeID, duration); + }); +} + +- (void)instantAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.InstantAction(success, failure, actionID, invokeID); + }); +} + +- (void)instantActionWithTransition:(uint16_t)actionID + invokeID:(uint32_t)invokeID + transitionTime:(uint16_t)transitionTime + responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.InstantActionWithTransition(success, failure, actionID, invokeID, transitionTime); + }); +} + +- (void)pauseAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.PauseAction(success, failure, actionID, invokeID); + }); +} + +- (void)pauseActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.PauseActionWithDuration(success, failure, actionID, invokeID, duration); + }); +} + +- (void)resumeAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ResumeAction(success, failure, actionID, invokeID); + }); +} + +- (void)startAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.StartAction(success, failure, actionID, invokeID); + }); +} + +- (void)startActionWithDuration:(uint16_t)actionID + invokeID:(uint32_t)invokeID + duration:(uint32_t)duration + responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.StartActionWithDuration(success, failure, actionID, invokeID, duration); + }); +} + +- (void)stopAction:(uint16_t)actionID invokeID:(uint32_t)invokeID responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.StopAction(success, failure, actionID, invokeID); + }); +} + +- (void)readAttributeActionListWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPBridgedActionsActionListListAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeActionList(success, failure); + }); +} + +- (void)readAttributeEndpointListWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPBridgedActionsEndpointListListAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeEndpointList(success, failure); + }); +} + +- (void)readAttributeSetupUrlWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeSetupUrl(success, failure); + }); +} + +- (void)readAttributeClusterRevisionWithResponseHandler:(ResponseHandler)responseHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.ReadAttributeClusterRevision(success, failure); + }); +} + +@end + @implementation CHIPBridgedDeviceBasic - (chip::Controller::ClusterBase *)getCluster diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h index 26c9aea951372b..fe2dfffa5bb3aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h @@ -61,6 +61,10 @@ @property (readonly) chip::Controller::BooleanStateCluster cppCluster; @end +@interface CHIPBridgedActions () +@property (readonly) chip::Controller::BridgedActionsCluster cppCluster; +@end + @interface CHIPBridgedDeviceBasic () @property (readonly) chip::Controller::BridgedDeviceBasicCluster cppCluster; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 611335e27f41e2..a6e3f0f01ba989 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -154,6 +154,17 @@ NS_ASSUME_NONNULL_BEGIN @end +/** + * Cluster Bridged Actions + * + */ +@interface CHIPTestBridgedActions : CHIPBridgedActions + +- (void)writeAttributeSetupUrlWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler; +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler; + +@end + /** * Cluster Bridged Device Basic * diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index c2c6673ea5dfa4..453f00dff8143f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -445,6 +445,33 @@ new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Canc @end +@interface CHIPTestBridgedActions () +@property (readonly) chip::Controller::BridgedActionsClusterTest cppCluster; +@end + +@implementation CHIPTestBridgedActions + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)writeAttributeSetupUrlWithValue:(NSString *)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeSetupUrl(success, failure, [self asCharSpan:value]); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(uint16_t)value responseHandler:(ResponseHandler)responseHandler +{ + new CHIPDefaultSuccessCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.WriteAttributeClusterRevision(success, failure, value); + }); +} + +@end + @interface CHIPTestBridgedDeviceBasic () @property (readonly) chip::Controller::BridgedDeviceBasicClusterTest cppCluster; @end diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index b7f692f31b8ff5..d4a1b8924525a2 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -12821,6 +12821,80 @@ - (void)testSendClusterBooleanStateReadAttributeClusterRevisionWithResponseHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBridgedActionsReadAttributeActionListWithResponseHandler +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"BridgedActionsReadAttributeActionListWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedActions * cluster = [[CHIPBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeActionListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedActions ActionList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedActionsReadAttributeEndpointListWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedActionsReadAttributeEndpointListWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedActions * cluster = [[CHIPBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEndpointListWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedActions EndpointList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedActionsReadAttributeSetupUrlWithResponseHandler +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"BridgedActionsReadAttributeSetupUrlWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedActions * cluster = [[CHIPBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSetupUrlWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedActions SetupUrl Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterBridgedActionsReadAttributeClusterRevisionWithResponseHandler +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedActionsReadAttributeClusterRevisionWithResponseHandler"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPBridgedActions * cluster = [[CHIPBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"BridgedActions ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterBridgedDeviceBasicReadAttributeVendorNameWithResponseHandler { XCTestExpectation * expectation = diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index 0c348ff2f7dbe6..8efefb3ea0996c 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -214,6 +214,145 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace Binding +namespace BridgedActions { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV + // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. + // Any error value TLVUnpackError means we have received an illegal value. + // The following variables are used for all commands to save code size. + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::DisableAction::Id: { + Commands::DisableAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterDisableActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::DisableActionWithDuration::Id: { + Commands::DisableActionWithDuration::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterDisableActionWithDurationCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::EnableAction::Id: { + Commands::EnableAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterEnableActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::EnableActionWithDuration::Id: { + Commands::EnableActionWithDuration::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterEnableActionWithDurationCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::InstantAction::Id: { + Commands::InstantAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterInstantActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::InstantActionWithTransition::Id: { + Commands::InstantActionWithTransition::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = + emberAfBridgedActionsClusterInstantActionWithTransitionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::PauseAction::Id: { + Commands::PauseAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterPauseActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::PauseActionWithDuration::Id: { + Commands::PauseActionWithDuration::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterPauseActionWithDurationCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::ResumeAction::Id: { + Commands::ResumeAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterResumeActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StartAction::Id: { + Commands::StartAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterStartActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StartActionWithDuration::Id: { + Commands::StartActionWithDuration::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterStartActionWithDurationCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StopAction::Id: { + Commands::StopAction::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfBridgedActionsClusterStopActionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + ReportCommandUnsupported(apCommandObj, aCommandPath); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace BridgedActions + namespace ColorControl { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1864,6 +2003,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::Binding::Id: Clusters::Binding::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::BridgedActions::Id: + Clusters::BridgedActions::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::ColorControl::Id: Clusters::ColorControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index ae34edf0a5c251..a907c55b7876a3 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,7 @@ MatterBinaryInputBasicPluginServerInitCallback(); \ MatterBindingPluginServerInitCallback(); \ MatterBooleanStatePluginServerInitCallback(); \ + MatterBridgedActionsPluginServerInitCallback(); \ MatterBridgedDeviceBasicPluginServerInitCallback(); \ MatterColorControlPluginServerInitCallback(); \ MatterContentLauncherPluginServerInitCallback(); \ diff --git a/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp b/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp index c317be238e49ec..6b2f90fd3ac906 100644 --- a/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp @@ -133,6 +133,82 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo } break; } + case 0x0025: // Bridged Actions Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // action list + { + entryLength = 42; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _ActionStruct + _ActionStruct * entry = reinterpret_cast<_ActionStruct *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->ActionID, write ? (uint8_t *) &entry->ActionID : src, write, + &entryOffset, sizeof(entry->ActionID)); // INT16U + ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING + ByteSpan * NameSpan = &NameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset, + sizeof(entry->Type)); // ActionTypeEnum + copyListMember(write ? dest : (uint8_t *) &entry->EndpointListID, write ? (uint8_t *) &entry->EndpointListID : src, + write, &entryOffset, sizeof(entry->EndpointListID)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->SupportedCommands, + write ? (uint8_t *) &entry->SupportedCommands : src, write, &entryOffset, + sizeof(entry->SupportedCommands)); // INT16U + copyListMember(write ? dest : (uint8_t *) &entry->Status, write ? (uint8_t *) &entry->Status : src, write, &entryOffset, + sizeof(entry->Status)); // ActionStatusEnum + break; + } + case 0x0001: // endpoint list + { + entryLength = 295; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _EndpointListStruct + _EndpointListStruct * entry = reinterpret_cast<_EndpointListStruct *>(write ? src : dest); + copyListMember(write ? dest : (uint8_t *) &entry->EndpointListID, write ? (uint8_t *) &entry->EndpointListID : src, + write, &entryOffset, sizeof(entry->EndpointListID)); // INT16U + ByteSpan NameSpanStorage(Uint8::from_const_char(entry->Name.data()), entry->Name.size()); // CHAR_STRING + ByteSpan * NameSpan = &NameSpanStorage; + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset, + sizeof(entry->Type)); // EndpointListTypeEnum + ByteSpan * EndpointsSpan = &entry->Endpoints; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 258, EndpointsSpan) + : ReadByteSpan(src + entryOffset, 258, EndpointsSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 258); + break; + } + } + break; + } case 0x050A: // Content Launcher Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -900,6 +976,19 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut break; } break; + case 0x0025: // Bridged Actions Cluster + switch (attributeId) + { + case 0x0000: // action list + // Struct _ActionStruct + entryLength = 42; + break; + case 0x0001: // endpoint list + // Struct _EndpointListStruct + entryLength = 295; + break; + } + break; case 0x050A: // Content Launcher Cluster switch (attributeId) { diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index cdee6c441b627d..64743735f8d41b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -59,6 +59,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BOOLEAN_STATE_CLUSTER_ID: emberAfBooleanStateClusterInitCallback(endpoint); break; + case ZCL_BRIDGED_ACTIONS_CLUSTER_ID: + emberAfBridgedActionsClusterInitCallback(endpoint); + break; case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: emberAfBridgedDeviceBasicClusterInitCallback(endpoint); break; @@ -250,6 +253,11 @@ void __attribute__((weak)) emberAfBooleanStateClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfBridgedActionsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfBridgedDeviceBasicClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 258a7e393ccb93..606162da921786 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -463,59 +463,122 @@ /* 3285 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Bridged Actions (server), big-endian */ \ + \ + /* 3289 - action list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3545 - endpoint list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3801 - setup url, */ \ + 15, 'w', 'w', 'w', '.', 's', 'i', 'g', 'n', 'i', 'f', 'y', '.', 'c', 'o', 'm', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 3289 - Description, */ \ + /* 4314 - Description, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3350 - BatteryVoltage, */ \ + /* 4375 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3354 - BatteryTimeRemaining, */ \ + /* 4379 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3358 - ActiveBatteryFaults, */ \ + /* 4383 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3366 - FeatureMap, */ \ + /* 4391 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server), big-endian */ \ \ - /* 3370 - VendorName, */ \ + /* 4395 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3403 - ProductName, */ \ + /* 4428 - ProductName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3436 - UserLabel, */ \ + /* 4461 - UserLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3469 - HardwareVersionString, */ \ + /* 4494 - HardwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3534 - SoftwareVersion, */ \ + /* 4559 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3538 - SoftwareVersionString, */ \ + /* 4563 - SoftwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3603 - ManufacturingDate, */ \ + /* 4628 - ManufacturingDate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3620 - PartNumber, */ \ + /* 4645 - PartNumber, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -531,7 +594,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3875 - ProductURL, */ \ + /* 4900 - ProductURL, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -547,19 +610,19 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4130 - ProductLabel, */ \ + /* 5155 - ProductLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4195 - SerialNumber, */ \ + /* 5220 - SerialNumber, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 4228 - label list, */ \ + /* 5253 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -577,20 +640,20 @@ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 4482 - lifetime energy consumed, */ \ + /* 5507 - lifetime energy consumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4486 - FeatureMap, */ \ + /* 5511 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 4490 - FeatureMap, */ \ + /* 5515 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: Color Control (server), big-endian */ \ \ - /* 4494 - compensation text, */ \ + /* 5519 - compensation text, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -608,18 +671,18 @@ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 4749 - IAS CIE address, */ \ + /* 5774 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Wake on LAN (server), big-endian */ \ \ - /* 4757 - wake on lan mac address, */ \ + /* 5782 - wake on lan mac address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: TV Channel (server), big-endian */ \ \ - /* 4790 - tv channel list, */ \ + /* 5815 - tv channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -635,17 +698,17 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5044 - tv channel lineup, */ \ + /* 6069 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5077 - current tv channel, */ \ + /* 6102 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 5110 - target navigator list, */ \ + /* 6135 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -663,30 +726,30 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 5364 - start time, */ \ + /* 6389 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 5372 - duration, */ \ + /* 6397 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5380 - position updated at, */ \ + /* 6405 - position updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5388 - position, */ \ + /* 6413 - position, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5396 - playback speed, */ \ + /* 6421 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5404 - seek range end, */ \ + /* 6429 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5412 - seek range start, */ \ + /* 6437 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 5420 - media input list, */ \ + /* 6445 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -704,7 +767,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 5674 - accepts header list, */ \ + /* 6699 - accepts header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -720,7 +783,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5928 - supported streaming types, */ \ + /* 6953 - supported streaming types, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -738,7 +801,7 @@ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 6182 - audio output list, */ \ + /* 7207 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -756,7 +819,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 6436 - application launcher list, */ \ + /* 7461 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -774,45 +837,45 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 6690 - vendor name, */ \ + /* 7715 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6723 - application name, */ \ + /* 7748 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6756 - application id, */ \ + /* 7781 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 6789 - bitmap32, */ \ + /* 7814 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6793 - bitmap64, */ \ + /* 7818 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6801 - int32u, */ \ + /* 7826 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6805 - int64u, */ \ + /* 7830 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6813 - int32s, */ \ + /* 7838 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6817 - int64s, */ \ + /* 7842 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6825 - octet_string, */ \ + /* 7850 - octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6836 - list_int8u, */ \ + /* 7861 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6846 - list_octet_string, */ \ + /* 7871 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -828,7 +891,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 7100 - list_struct_octet_string, */ \ + /* 8125 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -844,7 +907,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 7354 - long_octet_string, */ \ + /* 8379 - long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -899,10 +962,10 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 8356 - char_string, */ \ + /* 9381 - char_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 8367 - long_char_string, */ \ + /* 9392 - long_char_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -957,23 +1020,23 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 9369 - epoch_us, */ \ + /* 10394 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 9377 - epoch_s, */ \ + /* 10402 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 9381 - measurement type, */ \ + /* 10406 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 9385 - total active power, */ \ + /* 10410 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 9389 - FeatureMap, */ \ + /* 10414 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -1417,59 +1480,122 @@ /* 3285 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Bridged Actions (server), little-endian */ \ + \ + /* 3289 - action list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3545 - endpoint list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3801 - setup url, */ \ + 15, 'w', 'w', 'w', '.', 's', 'i', 'g', 'n', 'i', 'f', 'y', '.', 'c', 'o', 'm', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 3289 - Description, */ \ + /* 4314 - Description, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3350 - BatteryVoltage, */ \ + /* 4375 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3354 - BatteryTimeRemaining, */ \ + /* 4379 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3358 - ActiveBatteryFaults, */ \ + /* 4383 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3366 - FeatureMap, */ \ + /* 4391 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server), little-endian */ \ \ - /* 3370 - VendorName, */ \ + /* 4395 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3403 - ProductName, */ \ + /* 4428 - ProductName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3436 - UserLabel, */ \ + /* 4461 - UserLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3469 - HardwareVersionString, */ \ + /* 4494 - HardwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3534 - SoftwareVersion, */ \ + /* 4559 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3538 - SoftwareVersionString, */ \ + /* 4563 - SoftwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3603 - ManufacturingDate, */ \ + /* 4628 - ManufacturingDate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3620 - PartNumber, */ \ + /* 4645 - PartNumber, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1485,7 +1611,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3875 - ProductURL, */ \ + /* 4900 - ProductURL, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1501,19 +1627,19 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4130 - ProductLabel, */ \ + /* 5155 - ProductLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4195 - SerialNumber, */ \ + /* 5220 - SerialNumber, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 4228 - label list, */ \ + /* 5253 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1531,20 +1657,20 @@ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 4482 - lifetime energy consumed, */ \ + /* 5507 - lifetime energy consumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4486 - FeatureMap, */ \ + /* 5511 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 4490 - FeatureMap, */ \ + /* 5515 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: Color Control (server), little-endian */ \ \ - /* 4494 - compensation text, */ \ + /* 5519 - compensation text, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1562,18 +1688,18 @@ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 4749 - IAS CIE address, */ \ + /* 5774 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Wake on LAN (server), little-endian */ \ \ - /* 4757 - wake on lan mac address, */ \ + /* 5782 - wake on lan mac address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: TV Channel (server), little-endian */ \ \ - /* 4790 - tv channel list, */ \ + /* 5815 - tv channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1589,17 +1715,17 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5044 - tv channel lineup, */ \ + /* 6069 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5077 - current tv channel, */ \ + /* 6102 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 5110 - target navigator list, */ \ + /* 6135 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1617,30 +1743,30 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 5364 - start time, */ \ + /* 6389 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 5372 - duration, */ \ + /* 6397 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5380 - position updated at, */ \ + /* 6405 - position updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5388 - position, */ \ + /* 6413 - position, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5396 - playback speed, */ \ + /* 6421 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5404 - seek range end, */ \ + /* 6429 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5412 - seek range start, */ \ + /* 6437 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 5420 - media input list, */ \ + /* 6445 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1658,7 +1784,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 5674 - accepts header list, */ \ + /* 6699 - accepts header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1674,7 +1800,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 5928 - supported streaming types, */ \ + /* 6953 - supported streaming types, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1692,7 +1818,7 @@ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 6182 - audio output list, */ \ + /* 7207 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1710,7 +1836,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 6436 - application launcher list, */ \ + /* 7461 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1728,45 +1854,45 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 6690 - vendor name, */ \ + /* 7715 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6723 - application name, */ \ + /* 7748 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6756 - application id, */ \ + /* 7781 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 6789 - bitmap32, */ \ + /* 7814 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6793 - bitmap64, */ \ + /* 7818 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6801 - int32u, */ \ + /* 7826 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6805 - int64u, */ \ + /* 7830 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6813 - int32s, */ \ + /* 7838 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 6817 - int64s, */ \ + /* 7842 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6825 - octet_string, */ \ + /* 7850 - octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6836 - list_int8u, */ \ + /* 7861 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 6846 - list_octet_string, */ \ + /* 7871 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1782,7 +1908,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 7100 - list_struct_octet_string, */ \ + /* 8125 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1798,7 +1924,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 7354 - long_octet_string, */ \ + /* 8379 - long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1853,10 +1979,10 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 8356 - char_string, */ \ + /* 9381 - char_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 8367 - long_char_string, */ \ + /* 9392 - long_char_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1911,29 +2037,29 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 9369 - epoch_us, */ \ + /* 10394 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 9377 - epoch_s, */ \ + /* 10402 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 9381 - measurement type, */ \ + /* 10406 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 9385 - total active power, */ \ + /* 10410 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 9389 - FeatureMap, */ \ + /* 10414 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (150) +#define GENERATED_DEFAULTS_COUNT (153) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1961,7 +2087,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 469 +#define GENERATED_ATTRIBUTE_COUNT 473 #define GENERATED_ATTRIBUTES \ { \ \ @@ -2216,39 +2342,45 @@ { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 256, 0, ZAP_LONG_DEFAULTS_INDEX(3289) }, /* action list */ \ + { 0x0001, ZAP_TYPE(ARRAY), 256, 0, ZAP_LONG_DEFAULTS_INDEX(3545) }, /* endpoint list */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 513, 0, ZAP_LONG_DEFAULTS_INDEX(3801) }, /* setup url */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(3289) }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3350) }, /* BatteryVoltage */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(4314) }, /* Description */ \ + { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4375) }, /* BatteryVoltage */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3354) }, /* BatteryTimeRemaining */ \ + { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4379) }, /* BatteryTimeRemaining */ \ { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(3358) }, /* ActiveBatteryFaults */ \ + { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(4383) }, /* ActiveBatteryFaults */ \ { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(3366) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4391) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(3370) }, /* VendorName */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4395) }, /* VendorName */ \ { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(3403) }, /* ProductName */ \ + { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4428) }, /* ProductName */ \ { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3436) }, /* UserLabel */ \ + ZAP_LONG_DEFAULTS_INDEX(4461) }, /* UserLabel */ \ { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(3469) }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(3534) }, /* SoftwareVersion */ \ + ZAP_LONG_DEFAULTS_INDEX(4494) }, /* HardwareVersionString */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4559) }, /* SoftwareVersion */ \ { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(3538) }, /* SoftwareVersionString */ \ + ZAP_LONG_DEFAULTS_INDEX(4563) }, /* SoftwareVersionString */ \ { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(3603) }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 255, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(3620) }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(CHAR_STRING), 255, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(3875) }, /* ProductURL */ \ + ZAP_LONG_DEFAULTS_INDEX(4628) }, /* ManufacturingDate */ \ + { 0x000C, ZAP_TYPE(CHAR_STRING), 255, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4645) }, /* PartNumber */ \ + { 0x000D, ZAP_TYPE(CHAR_STRING), 255, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(4900) }, /* ProductURL */ \ { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(4130) }, /* ProductLabel */ \ + ZAP_LONG_DEFAULTS_INDEX(5155) }, /* ProductLabel */ \ { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(4195) }, /* SerialNumber */ \ + ZAP_LONG_DEFAULTS_INDEX(5220) }, /* SerialNumber */ \ { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* Reachable */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -2258,7 +2390,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4228) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5253) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ @@ -2318,11 +2450,11 @@ { 0x0012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* effective control mode */ \ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* speed */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4482) }, /* lifetime energy consumed */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(5507) }, /* lifetime energy consumed */ \ { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* operation mode */ \ { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* control mode */ \ { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* alarm mask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4486) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(5511) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ @@ -2349,7 +2481,7 @@ { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4490) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(5515) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ @@ -2366,7 +2498,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 255, 0, ZAP_LONG_DEFAULTS_INDEX(4494) }, /* compensation text */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 255, 0, ZAP_LONG_DEFAULTS_INDEX(5519) }, /* compensation text */ \ { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ { 0x0008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ @@ -2449,37 +2581,37 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4749) }, /* IAS CIE address */ \ + { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(5774) }, /* IAS CIE address */ \ { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(4757) }, /* wake on lan mac address */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(5782) }, /* wake on lan mac address */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4790) }, /* tv channel list */ \ - { 0x0001, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(5044) }, /* tv channel lineup */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(5077) }, /* current tv channel */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5815) }, /* tv channel list */ \ + { 0x0001, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(6069) }, /* tv channel lineup */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(6102) }, /* current tv channel */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5110) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6135) }, /* target navigator list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(5364) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(5372) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(5380) }, /* position updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(5388) }, /* position */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(5396) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(5404) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(5412) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(6389) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(6397) }, /* duration */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(6405) }, /* position updated at */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(6413) }, /* position */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(6421) }, /* playback speed */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(6429) }, /* seek range end */ \ + { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(6437) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5420) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6445) }, /* media input list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2490,27 +2622,27 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5674) }, /* accepts header list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(5928) }, /* supported streaming types */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6699) }, /* accepts header list */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6953) }, /* supported streaming types */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6182) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7207) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6436) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7461) }, /* application launcher list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* catalog vendor id */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* application id */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(6690) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(7715) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(6723) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(7748) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(6756) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(7781) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application status */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -2522,45 +2654,45 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6789) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6793) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(7814) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(7818) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6801) }, /* int32u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6805) }, /* int64u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(7826) }, /* int32u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(7830) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6813) }, /* int32s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6817) }, /* int64s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(7838) }, /* int32s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(7842) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(6825) }, /* octet_string */ \ - { 0x001A, ZAP_TYPE(ARRAY), 10, 0, ZAP_LONG_DEFAULTS_INDEX(6836) }, /* list_int8u */ \ - { 0x001B, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(6846) }, /* list_octet_string */ \ - { 0x001C, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7100) }, /* list_struct_octet_string */ \ + ZAP_LONG_DEFAULTS_INDEX(7850) }, /* octet_string */ \ + { 0x001A, ZAP_TYPE(ARRAY), 10, 0, ZAP_LONG_DEFAULTS_INDEX(7861) }, /* list_int8u */ \ + { 0x001B, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(7871) }, /* list_octet_string */ \ + { 0x001C, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8125) }, /* list_struct_octet_string */ \ { 0x001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(7354) }, /* long_octet_string */ \ - { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(8356) }, /* char_string */ \ + ZAP_LONG_DEFAULTS_INDEX(8379) }, /* long_octet_string */ \ + { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(9381) }, /* char_string */ \ { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(8367) }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(9369) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(9377) }, /* epoch_s */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_LONG_DEFAULTS_INDEX(9392) }, /* long_char_string */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(10394) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(10402) }, /* epoch_s */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(9381) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(9385) }, /* total active power */ \ - { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ - { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ - { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ - { 0x0508, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current */ \ - { 0x0509, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current min */ \ - { 0x050A, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current max */ \ - { 0x050B, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power */ \ - { 0x050C, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power min */ \ - { 0x050D, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power max */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(10406) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(10410) }, /* total active power */ \ + { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ + { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ + { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ + { 0x0508, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current */ \ + { 0x0509, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current min */ \ + { 0x050A, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current max */ \ + { 0x050B, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power */ \ + { 0x050C, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power min */ \ + { 0x050D, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power max */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -2571,7 +2703,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(9389) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(10414) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ @@ -2640,7 +2772,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 61 +#define GENERATED_CLUSTER_COUNT 62 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -2758,130 +2890,133 @@ 0x001D, ZAP_ATTRIBUTE_INDEX(188), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(193), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(193), 4, 1027, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ + { \ + 0x002F, ZAP_ATTRIBUTE_INDEX(197), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(204), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(208), 15, 865, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(219), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(223), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(222), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(226), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(224), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(228), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(226), \ + ZAP_ATTRIBUTE_INDEX(230), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(230), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(234), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(249), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(253), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(254), \ + ZAP_ATTRIBUTE_INDEX(258), \ 24, \ 48, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(278), 18, 33, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(282), 18, 33, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(296), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0204, ZAP_ATTRIBUTE_INDEX(300), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(300), \ + ZAP_ATTRIBUTE_INDEX(304), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(353), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(357), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(357), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(361), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(361), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(365), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(365), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(369), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(369), \ + ZAP_ATTRIBUTE_INDEX(373), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(373), \ + ZAP_ATTRIBUTE_INDEX(377), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(379), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(383), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(381), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(385), 4, 322, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(385), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(389), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(387), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(391), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(396), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(400), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(399), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(403), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(400), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(404), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(401), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(405), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(404), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(408), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(407), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(411), 4, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(411), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(415), 8, 108, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(419), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(423), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(420), 25, 2607, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(424), 25, 2607, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(445), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(449), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(457), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(461), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(458), \ + ZAP_ATTRIBUTE_INDEX(462), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(465), \ + ZAP_ATTRIBUTE_INDEX(469), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2893,7 +3028,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 3376 }, { ZAP_CLUSTER_INDEX(18), 41, 6507 }, { ZAP_CLUSTER_INDEX(59), 2, 18 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 3376 }, { ZAP_CLUSTER_INDEX(18), 42, 7534 }, { ZAP_CLUSTER_INDEX(60), 2, 18 }, \ } // Largest attribute size is needed for various buffers @@ -2903,7 +3038,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1518) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (9901) +#define ATTRIBUTE_MAX_SIZE (10928) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index e3abeae03492c8..bd8b91850c4fec 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -39,6 +39,7 @@ #define EMBER_AF_BINARY_INPUT_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_BOOLEAN_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_BRIDGED_ACTIONS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -137,6 +138,11 @@ #define EMBER_AF_PLUGIN_BOOLEAN_STATE_SERVER #define EMBER_AF_PLUGIN_BOOLEAN_STATE +// Use this macro to check if the server side of the Bridged Actions cluster is included +#define ZCL_USING_BRIDGED_ACTIONS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_BRIDGED_ACTIONS_SERVER +#define EMBER_AF_PLUGIN_BRIDGED_ACTIONS + // Use this macro to check if the server side of the Bridged Device Basic cluster is included #define ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_SERVER diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index c8fe0aec8c193e..5fc0c80a77d98f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -80,6 +80,17 @@ typedef struct _ContentLaunchParamater /* TYPE WARNING: array array defaults to */ uint8_t * ExternalIDList; } ContentLaunchParamater; +// Struct for ActionStruct +typedef struct _ActionStruct +{ + uint16_t ActionID; + chip::CharSpan Name; + uint8_t Type; + uint16_t EndpointListID; + uint16_t SupportedCommands; + uint8_t Status; +} ActionStruct; + // Struct for ApplicationLauncherApp typedef struct _ApplicationLauncherApp { @@ -149,6 +160,15 @@ typedef struct _DeviceType uint16_t revision; } DeviceType; +// Struct for EndpointListStruct +typedef struct _EndpointListStruct +{ + uint16_t EndpointListID; + chip::CharSpan Name; + uint8_t Type; + chip::ByteSpan Endpoints; +} EndpointListStruct; + // Struct for FabricDescriptor typedef struct _FabricDescriptor { diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 7abb52a49cba0c..308079962b0444 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -255,6 +255,15 @@ #define ZCL_LONG_POLL_INTERVAL_MIN_ATTRIBUTE_ID (0x0005) #define ZCL_FAST_POLL_TIMEOUT_MAX_ATTRIBUTE_ID (0x0006) +// Attribute ids for cluster: Bridged Actions + +// Client attributes + +// Server attributes +#define ZCL_ACTION_LIST_ATTRIBUTE_ID (0x0000) +#define ZCL_ENDPOINT_LIST_ATTRIBUTE_ID (0x0001) +#define ZCL_SETUP_URL_ATTRIBUTE_ID (0x0002) + // Attribute ids for cluster: Basic // Client attributes diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 32e30bfd582af5..e07e22146b680a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -1962,6 +1962,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t fastPollTimeoutMax) } // namespace Attributes } // namespace PollControl +namespace BridgedActions { +namespace Attributes { + +} // namespace Attributes +} // namespace BridgedActions + namespace Basic { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index a5c68d797f10b5..fe7c09b477e468 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -756,6 +756,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t fastPollTimeoutMax); } // namespace Attributes } // namespace PollControl +namespace BridgedActions { +namespace Attributes { + +} // namespace Attributes +} // namespace BridgedActions + namespace Basic { namespace Attributes { 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 240bfb9da43872..2c2a5d9897b46f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -166,6 +166,14 @@ void emberAfDescriptorClusterInitCallback(chip::EndpointId endpoint); */ void emberAfPollControlClusterInitCallback(chip::EndpointId endpoint); +/** @brief Bridged Actions Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBridgedActionsClusterInitCallback(chip::EndpointId endpoint); + /** @brief Basic Cluster Init * * Cluster Init @@ -2470,6 +2478,112 @@ void emberAfPollControlClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfPollControlClusterClientTickCallback(chip::EndpointId endpoint); +// +// Bridged Actions Cluster +// + +/** @brief Bridged Actions Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBridgedActionsClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Bridged Actions Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBridgedActionsClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Bridged Actions Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterBridgedActionsClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Bridged Actions Cluster Client Attribute Changed + * + * Client Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterBridgedActionsClusterClientAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Bridged Actions Cluster Server Message Sent + * + * Server Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfBridgedActionsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Bridged Actions Cluster Client Message Sent + * + * Client Message Sent + * + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfBridgedActionsClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Bridged Actions Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterBridgedActionsClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Bridged Actions Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterBridgedActionsClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Bridged Actions Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBridgedActionsClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Bridged Actions Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBridgedActionsClusterClientTickCallback(chip::EndpointId endpoint); + // // Basic Cluster // @@ -12665,6 +12779,78 @@ bool emberAfPollControlClusterSetLongPollIntervalCallback( bool emberAfPollControlClusterSetShortPollIntervalCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::PollControl::Commands::SetShortPollInterval::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster InstantAction Command callback (from client) + */ +bool emberAfBridgedActionsClusterInstantActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::InstantAction::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster InstantActionWithTransition Command callback (from client) + */ +bool emberAfBridgedActionsClusterInstantActionWithTransitionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster StartAction Command callback (from client) + */ +bool emberAfBridgedActionsClusterStartActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StartAction::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster StartActionWithDuration Command callback (from client) + */ +bool emberAfBridgedActionsClusterStartActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster StopAction Command callback (from client) + */ +bool emberAfBridgedActionsClusterStopActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::StopAction::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster PauseAction Command callback (from client) + */ +bool emberAfBridgedActionsClusterPauseActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::PauseAction::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster PauseActionWithDuration Command callback (from client) + */ +bool emberAfBridgedActionsClusterPauseActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster ResumeAction Command callback (from client) + */ +bool emberAfBridgedActionsClusterResumeActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::ResumeAction::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster EnableAction Command callback (from client) + */ +bool emberAfBridgedActionsClusterEnableActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::EnableAction::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster EnableActionWithDuration Command callback (from client) + */ +bool emberAfBridgedActionsClusterEnableActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster DisableAction Command callback (from client) + */ +bool emberAfBridgedActionsClusterDisableActionCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::DisableAction::DecodableType & commandData); +/** + * @brief Bridged Actions Cluster DisableActionWithDuration Command callback (from client) + */ +bool emberAfBridgedActionsClusterDisableActionWithDurationCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::DecodableType & commandData); /** * @brief Basic Cluster StartUp Command callback (from server) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h index a43228f02ec736..dd5240b33691c4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h +++ b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h @@ -64,6 +64,9 @@ void __attribute__((weak)) MatterDescriptorPluginServerInitCallback(){}; void __attribute__((weak)) MatterPollControlPluginClientInitCallback(){}; void __attribute__((weak)) MatterPollControlPluginServerInitCallback(){}; +void __attribute__((weak)) MatterBridgedActionsPluginClientInitCallback(){}; +void __attribute__((weak)) MatterBridgedActionsPluginServerInitCallback(){}; + void __attribute__((weak)) MatterBasicPluginClientInitCallback(){}; void __attribute__((weak)) MatterBasicPluginServerInitCallback(){}; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h index 4ecece15b58a4f..081c32e27d5f62 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h @@ -67,6 +67,9 @@ static constexpr chip::ClusterId ZCL_DESCRIPTOR_CLUSTER_ID = 0x001D; // Definitions for cluster: Poll Control static constexpr chip::ClusterId ZCL_POLL_CONTROL_CLUSTER_ID = 0x0020; +// Definitions for cluster: Bridged Actions +static constexpr chip::ClusterId ZCL_BRIDGED_ACTIONS_CLUSTER_ID = 0x0025; + // Definitions for cluster: Basic static constexpr chip::ClusterId ZCL_BASIC_CLUSTER_ID = 0x0028; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index b300869e4a07b1..5088b6e6ca14ff 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -3905,6 +3905,597 @@ namespace Events { } // namespace Events } // namespace PollControl +namespace BridgedActions { +namespace Structs { +namespace ActionStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndpointListID)), endpointListID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSupportedCommands)), supportedCommands)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kName): + ReturnErrorOnFailure(DataModel::Decode(reader, name)); + break; + case to_underlying(Fields::kType): + ReturnErrorOnFailure(DataModel::Decode(reader, type)); + break; + case to_underlying(Fields::kEndpointListID): + ReturnErrorOnFailure(DataModel::Decode(reader, endpointListID)); + break; + case to_underlying(Fields::kSupportedCommands): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedCommands)); + break; + case to_underlying(Fields::kStatus): + ReturnErrorOnFailure(DataModel::Decode(reader, status)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace ActionStruct +namespace EndpointListStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndpointListID)), endpointListID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kName)), name)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kType)), type)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEndpoints)), endpoints)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kEndpointListID): + ReturnErrorOnFailure(DataModel::Decode(reader, endpointListID)); + break; + case to_underlying(Fields::kName): + ReturnErrorOnFailure(DataModel::Decode(reader, name)); + break; + case to_underlying(Fields::kType): + ReturnErrorOnFailure(DataModel::Decode(reader, type)); + break; + case to_underlying(Fields::kEndpoints): + ReturnErrorOnFailure(DataModel::Decode(reader, endpoints)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} + +} // namespace EndpointListStruct +} // namespace Structs + +namespace Commands { +namespace InstantAction { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace InstantAction. +namespace InstantActionWithTransition { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + case to_underlying(Fields::kTransitionTime): + ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace InstantActionWithTransition. +namespace StartAction { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace StartAction. +namespace StartActionWithDuration { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDuration)), duration)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + case to_underlying(Fields::kDuration): + ReturnErrorOnFailure(DataModel::Decode(reader, duration)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace StartActionWithDuration. +namespace StopAction { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace StopAction. +namespace PauseAction { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace PauseAction. +namespace PauseActionWithDuration { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDuration)), duration)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + case to_underlying(Fields::kDuration): + ReturnErrorOnFailure(DataModel::Decode(reader, duration)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace PauseActionWithDuration. +namespace ResumeAction { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ResumeAction. +namespace EnableAction { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace EnableAction. +namespace EnableActionWithDuration { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDuration)), duration)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + case to_underlying(Fields::kDuration): + ReturnErrorOnFailure(DataModel::Decode(reader, duration)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace EnableActionWithDuration. +namespace DisableAction { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace DisableAction. +namespace DisableActionWithDuration { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kActionID)), actionID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kInvokeID)), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDuration)), duration)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActionID): + ReturnErrorOnFailure(DataModel::Decode(reader, actionID)); + break; + case to_underlying(Fields::kInvokeID): + ReturnErrorOnFailure(DataModel::Decode(reader, invokeID)); + break; + case to_underlying(Fields::kDuration): + ReturnErrorOnFailure(DataModel::Decode(reader, duration)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace DisableActionWithDuration. +} // namespace Commands + +namespace Events { +} // namespace Events + +} // namespace BridgedActions namespace Basic { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 5bb83e8de11234..e28dbf7071222a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -4961,6 +4961,559 @@ struct TypeInfo } // namespace ClusterRevision } // namespace Attributes } // namespace PollControl +namespace BridgedActions { +// Need to convert consumers to using the new enum classes, so we +// don't just have casts all over. +#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +// Enum for ActionErrorEnum +enum class ActionErrorEnum : uint8_t +{ + kUnknown = 0x00, + kInterrupted = 0x01, +}; +#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +using ActionErrorEnum = EmberAfActionErrorEnum; +#endif +// Need to convert consumers to using the new enum classes, so we +// don't just have casts all over. +#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +// Enum for ActionStatusEnum +enum class ActionStatusEnum : uint8_t +{ + kInactive = 0x00, + kActive = 0x01, + kPaused = 0x02, + kDisabled = 0x03, +}; +#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +using ActionStatusEnum = EmberAfActionStatusEnum; +#endif +// Need to convert consumers to using the new enum classes, so we +// don't just have casts all over. +#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +// Enum for ActionTypeEnum +enum class ActionTypeEnum : uint8_t +{ + kOther = 0x00, + kScene = 0x01, + kSequence = 0x02, + kAutomation = 0x03, + kException = 0x04, + kNotification = 0x05, + kAlarm = 0x06, +}; +#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +using ActionTypeEnum = EmberAfActionTypeEnum; +#endif +// Need to convert consumers to using the new enum classes, so we +// don't just have casts all over. +#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +// Enum for EndpointListTypeEnum +enum class EndpointListTypeEnum : uint8_t +{ + kOther = 0x00, + kRoom = 0x01, + kZone = 0x02, +}; +#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +using EndpointListTypeEnum = EmberAfEndpointListTypeEnum; +#endif + +// Bitmap for CommandBits +enum class CommandBits : uint16_t +{ + kInstantAction = 0, + kInstantActionWithTransition = 1, + kStartAction = 2, + kStartActionWithDuration = 3, + kStopAction = 4, + kPauseAction = 5, + kPauseActionWithDuration = 6, + kResumeAction = 7, + kEnableAction = 8, + kEnableActionWithDuration = 9, + kDisableAction = 10, + kDisableActionWithDuration = 11, +}; + +namespace Structs { +namespace ActionStruct { +enum class Fields +{ + kActionID = 0, + kName = 1, + kType = 2, + kEndpointListID = 3, + kSupportedCommands = 4, + kStatus = 5, +}; + +struct Type +{ +public: + uint16_t actionID; + chip::CharSpan name; + ActionTypeEnum type; + uint16_t endpointListID; + uint16_t supportedCommands; + ActionStatusEnum status; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace ActionStruct +namespace EndpointListStruct { +enum class Fields +{ + kEndpointListID = 0, + kName = 1, + kType = 2, + kEndpoints = 3, +}; + +struct Type +{ +public: + uint16_t endpointListID; + chip::CharSpan name; + EndpointListTypeEnum type; + chip::ByteSpan endpoints; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; + +using DecodableType = Type; + +} // namespace EndpointListStruct +} // namespace Structs + +namespace Commands { +namespace InstantAction { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return InstantAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return InstantAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace InstantAction +namespace InstantActionWithTransition { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, + kTransitionTime = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return InstantActionWithTransition::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint16_t transitionTime; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return InstantActionWithTransition::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint16_t transitionTime; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace InstantActionWithTransition +namespace StartAction { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return StartAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return StartAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StartAction +namespace StartActionWithDuration { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, + kDuration = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return StartActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return StartActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StartActionWithDuration +namespace StopAction { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return StopAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return StopAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StopAction +namespace PauseAction { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return PauseAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return PauseAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace PauseAction +namespace PauseActionWithDuration { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, + kDuration = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return PauseActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return PauseActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace PauseActionWithDuration +namespace ResumeAction { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return ResumeAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return ResumeAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResumeAction +namespace EnableAction { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return EnableAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return EnableAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnableAction +namespace EnableActionWithDuration { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, + kDuration = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return EnableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return EnableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnableActionWithDuration +namespace DisableAction { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return DisableAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return DisableAction::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace DisableAction +namespace DisableActionWithDuration { +enum class Fields +{ + kActionID = 0, + kInvokeID = 1, + kDuration = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return DisableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return DisableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + + uint16_t actionID; + uint32_t invokeID; + uint32_t duration; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace DisableActionWithDuration +} // namespace Commands + +namespace Attributes { +namespace ActionList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActionList::Id; } +}; +} // namespace ActionList +namespace EndpointList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EndpointList::Id; } +}; +} // namespace EndpointList +namespace SetupUrl { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return BridgedActions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetupUrl::Id; } +}; +} // namespace SetupUrl +} // namespace Attributes +} // namespace BridgedActions namespace Basic { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index 864b40024e5f16..fda63f7427b9b2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -142,6 +142,20 @@ #define ZCL_SET_LONG_POLL_INTERVAL_COMMAND_ID (0x02) #define ZCL_SET_SHORT_POLL_INTERVAL_COMMAND_ID (0x03) +// Commands for cluster: Bridged Actions +#define ZCL_INSTANT_ACTION_COMMAND_ID (0x00) +#define ZCL_INSTANT_ACTION_WITH_TRANSITION_COMMAND_ID (0x01) +#define ZCL_START_ACTION_COMMAND_ID (0x02) +#define ZCL_START_ACTION_WITH_DURATION_COMMAND_ID (0x03) +#define ZCL_STOP_ACTION_COMMAND_ID (0x04) +#define ZCL_PAUSE_ACTION_COMMAND_ID (0x05) +#define ZCL_PAUSE_ACTION_WITH_DURATION_COMMAND_ID (0x06) +#define ZCL_RESUME_ACTION_COMMAND_ID (0x07) +#define ZCL_ENABLE_ACTION_COMMAND_ID (0x08) +#define ZCL_ENABLE_ACTION_WITH_DURATION_COMMAND_ID (0x09) +#define ZCL_DISABLE_ACTION_COMMAND_ID (0x0A) +#define ZCL_DISABLE_ACTION_WITH_DURATION_COMMAND_ID (0x0B) + // Commands for cluster: Basic #define ZCL_START_UP_COMMAND_ID (0x00) #define ZCL_MFG_SPECIFIC_PING_COMMAND_ID (0x00) diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 50a916b5c922ee..44e1bae57b0b70 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -24,6 +24,34 @@ // ZCL enums +// Enum for ActionErrorEnum +enum EmberAfActionErrorEnum : uint8_t +{ + EMBER_ZCL_ACTION_ERROR_ENUM_UNKNOWN = 0, + EMBER_ZCL_ACTION_ERROR_ENUM_INTERRUPTED = 1, +}; + +// Enum for ActionStatusEnum +enum EmberAfActionStatusEnum : uint8_t +{ + EMBER_ZCL_ACTION_STATUS_ENUM_INACTIVE = 0, + EMBER_ZCL_ACTION_STATUS_ENUM_ACTIVE = 1, + EMBER_ZCL_ACTION_STATUS_ENUM_PAUSED = 2, + EMBER_ZCL_ACTION_STATUS_ENUM_DISABLED = 3, +}; + +// Enum for ActionTypeEnum +enum EmberAfActionTypeEnum : uint8_t +{ + EMBER_ZCL_ACTION_TYPE_ENUM_OTHER = 0, + EMBER_ZCL_ACTION_TYPE_ENUM_SCENE = 1, + EMBER_ZCL_ACTION_TYPE_ENUM_SEQUENCE = 2, + EMBER_ZCL_ACTION_TYPE_ENUM_AUTOMATION = 3, + EMBER_ZCL_ACTION_TYPE_ENUM_EXCEPTION = 4, + EMBER_ZCL_ACTION_TYPE_ENUM_NOTIFICATION = 5, + EMBER_ZCL_ACTION_TYPE_ENUM_ALARM = 6, +}; + // Enum for AlertCountType enum EmberAfAlertCountType : uint8_t { @@ -465,6 +493,14 @@ enum EmberAfDoorState : uint8_t EMBER_ZCL_DOOR_STATE_ERROR_UNSPECIFIED = 4, }; +// Enum for EndpointListTypeEnum +enum EmberAfEndpointListTypeEnum : uint8_t +{ + EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_OTHER = 0, + EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_ROOM = 1, + EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_ZONE = 2, +}; + // Enum for EnhancedColorMode enum EmberAfEnhancedColorMode : uint8_t { @@ -1701,6 +1737,30 @@ enum EmberAfWiredFaultType : uint8_t #define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_TIME_OFFSET (2) #define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_START_HUE (8) #define EMBER_AF_COLOR_LOOP_UPDATE_FLAGS_UPDATE_START_HUE_OFFSET (3) +#define EMBER_AF_COMMAND_BITS_INSTANT_ACTION (1) +#define EMBER_AF_COMMAND_BITS_INSTANT_ACTION_OFFSET (0) +#define EMBER_AF_COMMAND_BITS_INSTANT_ACTION_WITH_TRANSITION (2) +#define EMBER_AF_COMMAND_BITS_INSTANT_ACTION_WITH_TRANSITION_OFFSET (1) +#define EMBER_AF_COMMAND_BITS_START_ACTION (4) +#define EMBER_AF_COMMAND_BITS_START_ACTION_OFFSET (2) +#define EMBER_AF_COMMAND_BITS_START_ACTION_WITH_DURATION (8) +#define EMBER_AF_COMMAND_BITS_START_ACTION_WITH_DURATION_OFFSET (3) +#define EMBER_AF_COMMAND_BITS_STOP_ACTION (16) +#define EMBER_AF_COMMAND_BITS_STOP_ACTION_OFFSET (4) +#define EMBER_AF_COMMAND_BITS_PAUSE_ACTION (32) +#define EMBER_AF_COMMAND_BITS_PAUSE_ACTION_OFFSET (5) +#define EMBER_AF_COMMAND_BITS_PAUSE_ACTION_WITH_DURATION (64) +#define EMBER_AF_COMMAND_BITS_PAUSE_ACTION_WITH_DURATION_OFFSET (6) +#define EMBER_AF_COMMAND_BITS_RESUME_ACTION (128) +#define EMBER_AF_COMMAND_BITS_RESUME_ACTION_OFFSET (7) +#define EMBER_AF_COMMAND_BITS_ENABLE_ACTION (256) +#define EMBER_AF_COMMAND_BITS_ENABLE_ACTION_OFFSET (8) +#define EMBER_AF_COMMAND_BITS_ENABLE_ACTION_WITH_DURATION (512) +#define EMBER_AF_COMMAND_BITS_ENABLE_ACTION_WITH_DURATION_OFFSET (9) +#define EMBER_AF_COMMAND_BITS_DISABLE_ACTION (1024) +#define EMBER_AF_COMMAND_BITS_DISABLE_ACTION_OFFSET (10) +#define EMBER_AF_COMMAND_BITS_DISABLE_ACTION_WITH_DURATION (2048) +#define EMBER_AF_COMMAND_BITS_DISABLE_ACTION_WITH_DURATION_OFFSET (11) #define EMBER_AF_DAY_OF_WEEK_SUNDAY (1) #define EMBER_AF_DAY_OF_WEEK_SUNDAY_OFFSET (0) #define EMBER_AF_DAY_OF_WEEK_MONDAY (2) diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index cce914735b2d34..c302fd8ba8ea80 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -805,6 +805,28 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace PollControl +namespace BridgedActions { +namespace Attributes { + +namespace ActionList { +static constexpr AttributeId Id = 0x00000000; +} // namespace ActionList + +namespace EndpointList { +static constexpr AttributeId Id = 0x00000001; +} // namespace EndpointList + +namespace SetupUrl { +static constexpr AttributeId Id = 0x00000002; +} // namespace SetupUrl + +namespace FeatureMap = Globals::Attributes::FeatureMap; + +namespace ClusterRevision = Globals::Attributes::ClusterRevision; + +} // namespace Attributes +} // namespace BridgedActions + namespace Basic { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 7f9147cbfc87b8..f4660273a34967 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -70,6 +70,9 @@ static constexpr ClusterId Id = 0x0000001D; namespace PollControl { static constexpr ClusterId Id = 0x00000020; } // namespace PollControl +namespace BridgedActions { +static constexpr ClusterId Id = 0x00000025; +} // namespace BridgedActions namespace Basic { static constexpr ClusterId Id = 0x00000028; } // namespace Basic diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 4d854aba490213..6d7eeeba7cde33 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -449,6 +449,60 @@ static constexpr CommandId Id = 0x00000003; } // namespace Commands } // namespace PollControl +namespace BridgedActions { +namespace Commands { + +namespace InstantAction { +static constexpr CommandId Id = 0x00000000; +} // namespace InstantAction + +namespace InstantActionWithTransition { +static constexpr CommandId Id = 0x00000001; +} // namespace InstantActionWithTransition + +namespace StartAction { +static constexpr CommandId Id = 0x00000002; +} // namespace StartAction + +namespace StartActionWithDuration { +static constexpr CommandId Id = 0x00000003; +} // namespace StartActionWithDuration + +namespace StopAction { +static constexpr CommandId Id = 0x00000004; +} // namespace StopAction + +namespace PauseAction { +static constexpr CommandId Id = 0x00000005; +} // namespace PauseAction + +namespace PauseActionWithDuration { +static constexpr CommandId Id = 0x00000006; +} // namespace PauseActionWithDuration + +namespace ResumeAction { +static constexpr CommandId Id = 0x00000007; +} // namespace ResumeAction + +namespace EnableAction { +static constexpr CommandId Id = 0x00000008; +} // namespace EnableAction + +namespace EnableActionWithDuration { +static constexpr CommandId Id = 0x00000009; +} // namespace EnableActionWithDuration + +namespace DisableAction { +static constexpr CommandId Id = 0x0000000A; +} // namespace DisableAction + +namespace DisableActionWithDuration { +static constexpr CommandId Id = 0x0000000B; +} // namespace DisableActionWithDuration + +} // namespace Commands +} // namespace BridgedActions + namespace Basic { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index b4c5acc0a0217a..cc498c063779ff 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -114,6 +114,12 @@ #define CHIP_PRINTCLUSTER_POLL_CONTROL_CLUSTER #endif +#if defined(ZCL_USING_BRIDGED_ACTIONS_CLUSTER_SERVER) || defined(ZCL_USING_BRIDGED_ACTIONS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_BRIDGED_ACTIONS_CLUSTER { ZCL_BRIDGED_ACTIONS_CLUSTER_ID, 37, "Bridged Actions" }, +#else +#define CHIP_PRINTCLUSTER_BRIDGED_ACTIONS_CLUSTER +#endif + #if defined(ZCL_USING_BASIC_CLUSTER_SERVER) || defined(ZCL_USING_BASIC_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_BASIC_CLUSTER { ZCL_BASIC_CLUSTER_ID, 40, "Basic" }, #else @@ -753,6 +759,7 @@ CHIP_PRINTCLUSTER_APPLIANCE_CONTROL_CLUSTER \ CHIP_PRINTCLUSTER_DESCRIPTOR_CLUSTER \ CHIP_PRINTCLUSTER_POLL_CONTROL_CLUSTER \ + CHIP_PRINTCLUSTER_BRIDGED_ACTIONS_CLUSTER \ CHIP_PRINTCLUSTER_BASIC_CLUSTER \ CHIP_PRINTCLUSTER_OTA_PROVIDER_CLUSTER \ CHIP_PRINTCLUSTER_OTA_REQUESTOR_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 703cbf9d782a8a..de57c6c8caa50f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -213,6 +213,87 @@ static void OnAudioOutputAudioOutputListListAttributeResponse( command->SetCommandExitStatus(iter.GetStatus()); } +static void OnBridgedActionsActionListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + ModelCommand * command = static_cast(context); + + size_t count = 0; + { + auto iter = list.begin(); + while (iter.Next()) + { + ++count; + } + if (iter.GetStatus() != CHIP_NO_ERROR) + { + command->SetCommandExitStatus(iter.GetStatus()); + return; + } + } + ChipLogProgress(chipTool, "OnBridgedActionsActionListListAttributeResponse: %zu entries", count); + + auto iter = list.begin(); + uint16_t i = 0; + while (iter.Next()) + { +#if CHIP_PROGRESS_LOGGING + auto & entry = iter.GetValue(); +#endif // CHIP_PROGRESS_LOGGING + ++i; + ChipLogProgress(chipTool, "ActionStruct[%" PRIu16 "]:", i); + ChipLogProgress(chipTool, " actionID: %" PRIu16 "", entry.actionID); + ChipLogProgress(Zcl, " Name: %.*s", static_cast(entry.name.size()), entry.name.data()); + ChipLogProgress(chipTool, " type: %" PRIu8 "", entry.type); + ChipLogProgress(chipTool, " endpointListID: %" PRIu16 "", entry.endpointListID); + ChipLogProgress(chipTool, " supportedCommands: %" PRIu16 "", entry.supportedCommands); + ChipLogProgress(chipTool, " status: %" PRIu8 "", entry.status); + } + + command->SetCommandExitStatus(CHIP_NO_ERROR); +} + +static void OnBridgedActionsEndpointListListAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + ModelCommand * command = static_cast(context); + + size_t count = 0; + { + auto iter = list.begin(); + while (iter.Next()) + { + ++count; + } + if (iter.GetStatus() != CHIP_NO_ERROR) + { + command->SetCommandExitStatus(iter.GetStatus()); + return; + } + } + ChipLogProgress(chipTool, "OnBridgedActionsEndpointListListAttributeResponse: %zu entries", count); + + auto iter = list.begin(); + uint16_t i = 0; + while (iter.Next()) + { +#if CHIP_PROGRESS_LOGGING + auto & entry = iter.GetValue(); +#endif // CHIP_PROGRESS_LOGGING + ++i; + ChipLogProgress(chipTool, "EndpointListStruct[%" PRIu16 "]:", i); + ChipLogProgress(chipTool, " endpointListID: %" PRIu16 "", entry.endpointListID); + ChipLogProgress(Zcl, " Name: %.*s", static_cast(entry.name.size()), entry.name.data()); + ChipLogProgress(chipTool, " type: %" PRIu8 "", entry.type); + ChipLogProgress(Zcl, " Endpoints: %zu", entry.endpoints.size()); + } + + command->SetCommandExitStatus(CHIP_NO_ERROR); +} + static void OnContentLauncherAcceptsHeaderListListAttributeResponse(void * context, const chip::app::DataModel::DecodableList & list) @@ -1831,6 +1912,7 @@ static void OnTestClusterTestSpecificResponseSuccess( | BinaryInputBasic | 0x000F | | Binding | 0xF000 | | BooleanState | 0x0045 | +| BridgedActions | 0x0025 | | BridgedDeviceBasic | 0x0039 | | ColorControl | 0x0300 | | ContentLauncher | 0x050A | @@ -4310,6 +4392,485 @@ class ReadBooleanStateClusterRevision : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; +/*----------------------------------------------------------------------------*\ +| Cluster BridgedActions | 0x0025 | +|------------------------------------------------------------------------------| +| Commands: | | +| * DisableAction | 0x0A | +| * DisableActionWithDuration | 0x0B | +| * EnableAction | 0x08 | +| * EnableActionWithDuration | 0x09 | +| * InstantAction | 0x00 | +| * InstantActionWithTransition | 0x01 | +| * PauseAction | 0x05 | +| * PauseActionWithDuration | 0x06 | +| * ResumeAction | 0x07 | +| * StartAction | 0x02 | +| * StartActionWithDuration | 0x03 | +| * StopAction | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActionList | 0x0000 | +| * EndpointList | 0x0001 | +| * SetupUrl | 0x0002 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/* + * Command DisableAction + */ +class BridgedActionsDisableAction : public ModelCommand +{ +public: + BridgedActionsDisableAction() : ModelCommand("disable-action") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::DisableAction::Type mRequest; +}; + +/* + * Command DisableActionWithDuration + */ +class BridgedActionsDisableActionWithDuration : public ModelCommand +{ +public: + BridgedActionsDisableActionWithDuration() : ModelCommand("disable-action-with-duration") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type mRequest; +}; + +/* + * Command EnableAction + */ +class BridgedActionsEnableAction : public ModelCommand +{ +public: + BridgedActionsEnableAction() : ModelCommand("enable-action") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::EnableAction::Type mRequest; +}; + +/* + * Command EnableActionWithDuration + */ +class BridgedActionsEnableActionWithDuration : public ModelCommand +{ +public: + BridgedActionsEnableActionWithDuration() : ModelCommand("enable-action-with-duration") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type mRequest; +}; + +/* + * Command InstantAction + */ +class BridgedActionsInstantAction : public ModelCommand +{ +public: + BridgedActionsInstantAction() : ModelCommand("instant-action") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::InstantAction::Type mRequest; +}; + +/* + * Command InstantActionWithTransition + */ +class BridgedActionsInstantActionWithTransition : public ModelCommand +{ +public: + BridgedActionsInstantActionWithTransition() : ModelCommand("instant-action-with-transition") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type mRequest; +}; + +/* + * Command PauseAction + */ +class BridgedActionsPauseAction : public ModelCommand +{ +public: + BridgedActionsPauseAction() : ModelCommand("pause-action") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::PauseAction::Type mRequest; +}; + +/* + * Command PauseActionWithDuration + */ +class BridgedActionsPauseActionWithDuration : public ModelCommand +{ +public: + BridgedActionsPauseActionWithDuration() : ModelCommand("pause-action-with-duration") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type mRequest; +}; + +/* + * Command ResumeAction + */ +class BridgedActionsResumeAction : public ModelCommand +{ +public: + BridgedActionsResumeAction() : ModelCommand("resume-action") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::ResumeAction::Type mRequest; +}; + +/* + * Command StartAction + */ +class BridgedActionsStartAction : public ModelCommand +{ +public: + BridgedActionsStartAction() : ModelCommand("start-action") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::StartAction::Type mRequest; +}; + +/* + * Command StartActionWithDuration + */ +class BridgedActionsStartActionWithDuration : public ModelCommand +{ +public: + BridgedActionsStartActionWithDuration() : ModelCommand("start-action-with-duration") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type mRequest; +}; + +/* + * Command StopAction + */ +class BridgedActionsStopAction : public ModelCommand +{ +public: + BridgedActionsStopAction() : ModelCommand("stop-action") + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + } + +private: + chip::app::Clusters::BridgedActions::Commands::StopAction::Type mRequest; +}; + +/* + * Attribute ActionList + */ +class ReadBridgedActionsActionList : public ModelCommand +{ +public: + ReadBridgedActionsActionList() : ModelCommand("read") + { + AddArgument("attr-name", "action-list"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedActionsActionList() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0025) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeActionList(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnBridgedActionsActionListListAttributeResponse, + this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute EndpointList + */ +class ReadBridgedActionsEndpointList : public ModelCommand +{ +public: + ReadBridgedActionsEndpointList() : ModelCommand("read") + { + AddArgument("attr-name", "endpoint-list"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedActionsEndpointList() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0025) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeEndpointList(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback( + OnBridgedActionsEndpointListListAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute SetupUrl + */ +class ReadBridgedActionsSetupUrl : public ModelCommand +{ +public: + ReadBridgedActionsSetupUrl() : ModelCommand("read") + { + AddArgument("attr-name", "setup-url"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedActionsSetupUrl() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0025) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeSetupUrl(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnCharStringAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + +/* + * Attribute ClusterRevision + */ +class ReadBridgedActionsClusterRevision : public ModelCommand +{ +public: + ReadBridgedActionsClusterRevision() : ModelCommand("read") + { + AddArgument("attr-name", "cluster-revision"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedActionsClusterRevision() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0025) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttributeClusterRevision(onSuccessCallback->Cancel(), onFailureCallback->Cancel()); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnInt16uAttributeResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); +}; + /*----------------------------------------------------------------------------*\ | Cluster BridgedDeviceBasic | 0x0039 | |------------------------------------------------------------------------------| @@ -25634,6 +26195,31 @@ void registerClusterBooleanState(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterBridgedActions(Commands & commands) +{ + const char * clusterName = "BridgedActions"; + + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterBridgedDeviceBasic(Commands & commands) { const char * clusterName = "BridgedDeviceBasic"; @@ -26668,6 +27254,7 @@ void registerClusters(Commands & commands) registerClusterBinaryInputBasic(commands); registerClusterBinding(commands); registerClusterBooleanState(commands); + registerClusterBridgedActions(commands); registerClusterBridgedDeviceBasic(commands); registerClusterColorControl(commands); registerClusterContentLauncher(commands); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index a0798676e0427f..df6bdfb878df1d 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -185,6 +185,54 @@ void AudioOutputClusterAudioOutputListListAttributeFilter(TLV::TLVReader * tlvDa #pragma GCC diagnostic pop #endif // __clang__ +void BridgedActionsClusterActionListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} +#if !defined(__clang__) +#pragma GCC diagnostic pop +#endif // __clang__ + +void BridgedActionsClusterEndpointListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} +#if !defined(__clang__) +#pragma GCC diagnostic pop +#endif // __clang__ + void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index b7c61a1a325b9e..39497e45117a4f 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -159,6 +159,18 @@ void AudioOutputClusterAudioOutputListListAttributeFilter(chip::TLV::TLVReader * typedef void (*AudioOutputAudioOutputListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void BridgedActionsClusterActionListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BridgedActionsActionListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +void BridgedActionsClusterEndpointListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BridgedActionsEndpointListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 95011d06366822..61e887b1bde501 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -1447,6 +1447,652 @@ CHIP_ERROR BooleanStateCluster::ReadAttributeClusterRevision(Callback::Cancelabl BasicAttributeFilter); } +// BridgedActions Cluster Commands +CHIP_ERROR BridgedActionsCluster::DisableAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, BridgedActions::Commands::DisableAction::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::DisableActionWithDuration(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + BridgedActions::Commands::DisableActionWithDuration::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + // duration: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), duration)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::EnableAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, BridgedActions::Commands::EnableAction::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::EnableActionWithDuration(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + BridgedActions::Commands::EnableActionWithDuration::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + // duration: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), duration)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::InstantAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, BridgedActions::Commands::InstantAction::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::InstantActionWithTransition(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID, uint16_t transitionTime) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + BridgedActions::Commands::InstantActionWithTransition::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + // transitionTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::PauseAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, BridgedActions::Commands::PauseAction::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::PauseActionWithDuration(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + BridgedActions::Commands::PauseActionWithDuration::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + // duration: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), duration)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::ResumeAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, BridgedActions::Commands::ResumeAction::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::StartAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, BridgedActions::Commands::StartAction::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::StartActionWithDuration(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID, uint32_t duration) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + BridgedActions::Commands::StartActionWithDuration::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + // duration: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), duration)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR BridgedActionsCluster::StopAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, BridgedActions::Commands::StopAction::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // actionID: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), actionID)); + // invokeID: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), invokeID)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +// BridgedActions Cluster Attributes +CHIP_ERROR BridgedActionsCluster::ReadAttributeActionList(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000000; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BridgedActionsClusterActionListListAttributeFilter); +} + +CHIP_ERROR BridgedActionsCluster::ReadAttributeEndpointList(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000001; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BridgedActionsClusterEndpointListListAttributeFilter); +} + +CHIP_ERROR BridgedActionsCluster::ReadAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x00000002; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +CHIP_ERROR BridgedActionsCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + app::AttributePathParams attributePath; + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = 0x0000FFFD; + attributePath.mFlags.Set(app::AttributePathParams::Flags::kFieldIdValid); + return mDevice->SendReadAttributeRequest(attributePath, onSuccessCallback, onFailureCallback, + BasicAttributeFilter); +} + +template CHIP_ERROR ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::DisableAction::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR +ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::EnableAction::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::InstantAction::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR +ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::PauseAction::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR +ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::ResumeAction::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR +ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::StartAction::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + +template CHIP_ERROR +ClusterBase::InvokeCommand( + const chip::app::Clusters::BridgedActions::Commands::StopAction::Type &, void *, + CommandResponseSuccessCallback, CommandResponseFailureCallback); + // BridgedDeviceBasic Cluster Commands // BridgedDeviceBasic Cluster Attributes CHIP_ERROR BridgedDeviceBasicCluster::ReadAttributeVendorName(Callback::Cancelable * onSuccessCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index be01f762e7f415..3bf3a3892bc711 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -247,6 +247,47 @@ class DLL_EXPORT BooleanStateCluster : public ClusterBase CHIP_ERROR ReportAttributeStateValue(Callback::Cancelable * onReportCallback); }; +class DLL_EXPORT BridgedActionsCluster : public ClusterBase +{ +public: + BridgedActionsCluster() : ClusterBase(app::Clusters::BridgedActions::Id) {} + ~BridgedActionsCluster() {} + + // Cluster Commands + CHIP_ERROR DisableAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID); + CHIP_ERROR DisableActionWithDuration(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID, uint32_t duration); + CHIP_ERROR EnableAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID); + CHIP_ERROR EnableActionWithDuration(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID, uint32_t duration); + CHIP_ERROR InstantAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID); + CHIP_ERROR InstantActionWithTransition(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID, uint16_t transitionTime); + CHIP_ERROR PauseAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID); + CHIP_ERROR PauseActionWithDuration(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID, uint32_t duration); + CHIP_ERROR ResumeAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID); + CHIP_ERROR StartAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID); + CHIP_ERROR StartActionWithDuration(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID, uint32_t duration); + CHIP_ERROR StopAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, + uint32_t invokeID); + + // Cluster Attributes + CHIP_ERROR ReadAttributeActionList(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeEndpointList(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + +private: +}; + class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase { public: diff --git a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h index cd5ddf7938e8e6..e9571a75947e51 100644 --- a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h @@ -32,6 +32,7 @@ MatterBinaryInputBasicPluginClientInitCallback(); \ MatterBindingPluginClientInitCallback(); \ MatterBooleanStatePluginClientInitCallback(); \ + MatterBridgedActionsPluginClientInitCallback(); \ MatterBridgedDeviceBasicPluginClientInitCallback(); \ MatterColorControlPluginClientInitCallback(); \ MatterContentLauncherPluginClientInitCallback(); \ diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 72ca2ee2efa2d4..bd687e9051db71 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -59,6 +59,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BOOLEAN_STATE_CLUSTER_ID: emberAfBooleanStateClusterInitCallback(endpoint); break; + case ZCL_BRIDGED_ACTIONS_CLUSTER_ID: + emberAfBridgedActionsClusterInitCallback(endpoint); + break; case ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID: emberAfBridgedDeviceBasicClusterInitCallback(endpoint); break; @@ -247,6 +250,11 @@ void __attribute__((weak)) emberAfBooleanStateClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfBridgedActionsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfBridgedDeviceBasicClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index 5d2246a792aa7c..2878ea159f91c1 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -73,7 +73,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 54 +#define GENERATED_ATTRIBUTE_COUNT 55 #define GENERATED_ATTRIBUTES \ { \ \ @@ -101,6 +101,9 @@ /* Endpoint: 1, Cluster: Descriptor (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 1, Cluster: Bridged Actions (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Basic (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ @@ -247,7 +250,7 @@ #define GENERATED_FUNCTION_ARRAYS #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 54 +#define GENERATED_CLUSTER_COUNT 55 #define GENERATED_CLUSTERS \ { \ { 0x0003, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Identify (client) */ \ @@ -266,139 +269,142 @@ { \ 0x001D, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (client) */ \ - { 0x0028, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(9), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Bridged Actions (client) */ \ + { 0x0028, ZAP_ATTRIBUTE_INDEX(9), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ + { \ + 0x0029, ZAP_ATTRIBUTE_INDEX(10), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(10), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(14), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(15), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Diagnostic Logs (client) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(17), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(17), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(18), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(18), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(19), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(19), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(20), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(20), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ + { 0x003B, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(22), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: AdministratorCommissioning (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(22), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(23), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(23), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(24), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (client) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(24), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (client) */ \ { \ - 0x0101, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0101, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Door Lock (client) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (client) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(27), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (client) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(28), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(29), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (client) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0204, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (client) */ \ { \ - 0x0300, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0300, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Color Control (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (client) */ \ { \ - 0x0406, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0406, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Occupancy Sensing (client) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(40), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: TV Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(40), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(41), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(41), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Low Power (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (client) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (client) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Binding (client) */ \ { \ - 0xF004, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0xF004, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Group Key Management (client) */ \ } @@ -407,7 +413,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 54, 110 }, \ + { ZAP_CLUSTER_INDEX(0), 55, 112 }, \ } // Largest attribute size is needed for various buffers @@ -417,7 +423,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (4) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (110) +#define ATTRIBUTE_MAX_SIZE (112) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h index 2af81f499bc8d0..ff6380211a0ee8 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h @@ -39,6 +39,7 @@ #define EMBER_AF_BINARY_INPUT_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BINDING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BOOLEAN_STATE_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_BRIDGED_ACTIONS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -126,6 +127,10 @@ #define ZCL_USING_BOOLEAN_STATE_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_BOOLEAN_STATE_CLIENT +// Use this macro to check if the client side of the Bridged Actions cluster is included +#define ZCL_USING_BRIDGED_ACTIONS_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_BRIDGED_ACTIONS_CLIENT + // Use this macro to check if the client side of the Bridged Device Basic cluster is included #define ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_BRIDGED_DEVICE_BASIC_CLIENT diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp index 3c402d1340abd3..87c42da8c2245b 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp @@ -455,6 +455,41 @@ CHIP_ERROR BooleanStateClusterTest::WriteAttributeClusterRevision(Callback::Canc return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } +CHIP_ERROR BridgedActionsClusterTest::WriteAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan setupUrl) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = BridgedActions::Attributes::SetupUrl::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, setupUrl)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR BridgedActionsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t clusterRevision) +{ + app::WriteClientHandle handle; + chip::app::AttributePathParams attributePath; + attributePath.mNodeId = mDevice->GetDeviceId(); + attributePath.mEndpointId = mEndpoint; + attributePath.mClusterId = mClusterId; + attributePath.mFieldId = Globals::Attributes::ClusterRevision::Id; + attributePath.mFlags.Set(chip::app::AttributePathParams::Flags::kFieldIdValid); + + ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle)); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload(attributePath, clusterRevision)); + + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::CharSpan value) { diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index ddb2bee98300d4..d8242cfaeffdf9 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -186,6 +186,18 @@ class DLL_EXPORT BooleanStateClusterTest : public BooleanStateCluster uint16_t value); }; +class DLL_EXPORT BridgedActionsClusterTest : public BridgedActionsCluster +{ +public: + BridgedActionsClusterTest() : BridgedActionsCluster() {} + ~BridgedActionsClusterTest() {} + + CHIP_ERROR WriteAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::CharSpan value); + CHIP_ERROR WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t value); +}; + class DLL_EXPORT BridgedDeviceBasicClusterTest : public BridgedDeviceBasicCluster { public: