From dea9d931118fab8feb14064c47981074dc4aa833 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 14 Jun 2022 19:18:04 +0200 Subject: [PATCH 1/4] [chip-tv-casting-app] Update the TV casting app in order to share more code with chip-tool when it comes to commands parsing --- examples/chip-tool/BUILD.gn | 4 + examples/chip-tool/chip-tool.gni | 1 + .../commands/clusters/ModelCommand.h | 3 + .../commands/clusters/SubscriptionsCommands.h | 5 + .../chip-tool/commands/common/CHIPCommand.h | 8 +- .../chip-tool/commands/common/Commands.cpp | 2 + examples/chip-tool/commands/common/Commands.h | 5 + .../tv-casting-app/tv-casting-common/BUILD.gn | 17 +- .../commands/clusters/ClusterCommand.h | 184 ----- .../commands/clusters/ComplexArgument.h | 366 --------- .../commands/clusters/CustomArgument.h | 266 ------- .../commands/clusters/DataModelLogger.h | 163 ---- .../commands/clusters/ModelCommand.cpp | 18 +- .../commands/clusters/ModelCommand.h | 61 -- .../commands/clusters/ReportCommand.h | 576 -------------- .../commands/clusters/SubscriptionsCommands.h | 78 -- .../commands/clusters/WriteAttributeCommand.h | 151 ---- .../commands/common/CHIPCommand.cpp | 2 +- .../commands/common/CHIPCommand.h | 106 --- .../commands/common/Command.cpp | 747 ------------------ .../commands/common/Command.h | 253 ------ .../commands/common/Commands.cpp | 332 -------- .../commands/common/Commands.h | 52 -- .../common/CredentialIssuerCommands.h | 77 -- .../example/ExampleCredentialIssuerCommands.h | 54 -- 25 files changed, 48 insertions(+), 3483 deletions(-) delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/ClusterCommand.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/ComplexArgument.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/CustomArgument.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/DataModelLogger.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/ReportCommand.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/SubscriptionsCommands.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/clusters/WriteAttributeCommand.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/common/Command.cpp delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/common/Command.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/common/Commands.cpp delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/common/Commands.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/common/CredentialIssuerCommands.h delete mode 100644 examples/tv-casting-app/tv-casting-common/commands/example/ExampleCredentialIssuerCommands.h diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 2da0372fef7458..fbe554ed741318 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -30,6 +30,7 @@ config("config") { ] defines = [ + "CONFIG_USE_LOCAL_STORAGE=${config_use_local_storage}", "CONFIG_USE_SEPARATE_EVENTLOOP=${config_use_separate_eventloop}", "CONFIG_USE_INTERACTIVE_MODE=${config_use_interactive_mode}", "CONFIG_ENABLE_YAML_TESTS=${config_enable_yaml_tests}", @@ -49,10 +50,13 @@ static_library("chip-tool-utils") { "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp", "commands/clusters/ModelCommand.cpp", + "commands/clusters/ModelCommand.h", "commands/common/CHIPCommand.cpp", "commands/common/CHIPCommand.h", "commands/common/Command.cpp", + "commands/common/Command.h", "commands/common/Commands.cpp", + "commands/common/Commands.h", "commands/common/CredentialIssuerCommands.h", "commands/discover/DiscoverCommand.cpp", "commands/discover/DiscoverCommissionablesCommand.cpp", diff --git a/examples/chip-tool/chip-tool.gni b/examples/chip-tool/chip-tool.gni index 4e607dcdd7d6a0..b85f1f32340ed5 100644 --- a/examples/chip-tool/chip-tool.gni +++ b/examples/chip-tool/chip-tool.gni @@ -20,4 +20,5 @@ declare_args() { config_use_separate_eventloop = true config_use_interactive_mode = true config_enable_yaml_tests = true + config_use_local_storage = true } diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index b6fa961bff756d..4a0c2c08f5d469 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -18,7 +18,10 @@ #pragma once +#ifdef CONFIG_USE_LOCAL_STORAGE #include "../../config/PersistentStorage.h" +#endif // CONFIG_USE_LOCAL_STORAGE + #include "../common/CHIPCommand.h" #include diff --git a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h index effc9f4edca2b6..207127a39b1031 100644 --- a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h +++ b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h @@ -18,6 +18,11 @@ #pragma once +#include + +#include +#include + class ShutdownSubscription : public CHIPCommand { public: diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index 1313fadeb1f664..e484260a3a4fb1 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -18,8 +18,12 @@ #pragma once +#ifdef CONFIG_USE_LOCAL_STORAGE #include "../../config/PersistentStorage.h" +#endif // CONFIG_USE_LOCAL_STORAGE + #include "Command.h" + #include #include #include @@ -27,8 +31,6 @@ #pragma once -class PersistentStorage; - constexpr const char kIdentityAlpha[] = "alpha"; constexpr const char kIdentityBeta[] = "beta"; constexpr const char kIdentityGamma[] = "gamma"; @@ -114,8 +116,10 @@ class CHIPCommand : public Command // Execute any deferred cleanups. Used when exiting interactive mode. void ExecuteDeferredCleanups(); +#ifdef CONFIG_USE_LOCAL_STORAGE PersistentStorage mDefaultStorage; PersistentStorage mCommissionerStorage; +#endif // CONFIG_USE_LOCAL_STORAGE chip::PersistentStorageOperationalKeystore mOperationalKeystore; chip::Credentials::GroupDataProviderImpl mGroupDataProvider{ kMaxGroupsPerFabric, kMaxGroupKeysPerFabric }; diff --git a/examples/chip-tool/commands/common/Commands.cpp b/examples/chip-tool/commands/common/Commands.cpp index 131e66f1c8aa3e..b7bd6f03db466f 100644 --- a/examples/chip-tool/commands/common/Commands.cpp +++ b/examples/chip-tool/commands/common/Commands.cpp @@ -41,10 +41,12 @@ int Commands::Run(int argc, char ** argv) err = chip::Platform::MemoryInit(); VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(Controller, "Init Memory failure: %s", chip::ErrorStr(err))); +#ifdef CONFIG_USE_LOCAL_STORAGE err = mStorage.Init(); VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(Controller, "Init Storage failure: %s", chip::ErrorStr(err))); chip::Logging::SetLogFilter(mStorage.GetLoggingLevel()); +#endif // CONFIG_USE_LOCAL_STORAGE err = RunCommand(argc, argv); VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(chipTool, "Run command failure: %s", chip::ErrorStr(err))); diff --git a/examples/chip-tool/commands/common/Commands.h b/examples/chip-tool/commands/common/Commands.h index e70a942779c9e1..a39c984954777e 100644 --- a/examples/chip-tool/commands/common/Commands.h +++ b/examples/chip-tool/commands/common/Commands.h @@ -18,7 +18,10 @@ #pragma once +#ifdef CONFIG_USE_LOCAL_STORAGE #include "../../config/PersistentStorage.h" +#endif // CONFIG_USE_LOCAL_STORAGE + #include "Command.h" #include @@ -48,5 +51,7 @@ class Commands void ShowCommand(std::string executable, std::string clusterName, Command * command); std::map mClusters; +#ifdef CONFIG_USE_LOCAL_STORAGE PersistentStorage mStorage; +#endif // CONFIG_USE_LOCAL_STORAGE }; diff --git a/examples/tv-casting-app/tv-casting-common/BUILD.gn b/examples/tv-casting-app/tv-casting-common/BUILD.gn index 10ef81c9104434..fc3135ab8d263a 100644 --- a/examples/tv-casting-app/tv-casting-common/BUILD.gn +++ b/examples/tv-casting-app/tv-casting-common/BUILD.gn @@ -20,6 +20,7 @@ import("${chip_root}/src/lib/lib.gni") config("config") { include_dirs = [ ".", + "${chip_root}/examples/chip-tool", "${chip_root}/zzz_generated/chip-tool", "${chip_root}/zzz_generated/tv-casting-app", "${chip_root}/src/lib", @@ -35,14 +36,17 @@ chip_data_model("tv-casting-common") { "${chip_root}/zzz_generated/tv-casting-app/zap-generated" sources = [ + "${chip_root}/examples/chip-tool/commands/clusters/ModelCommand.h", + "${chip_root}/examples/chip-tool/commands/common/CHIPCommand.h", + "${chip_root}/examples/chip-tool/commands/common/Command.cpp", + "${chip_root}/examples/chip-tool/commands/common/Command.h", + "${chip_root}/examples/chip-tool/commands/common/Commands.cpp", + "${chip_root}/examples/chip-tool/commands/common/Commands.h", + "${chip_root}/examples/chip-tool/commands/common/CredentialIssuerCommands.h", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp", "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp", "commands/clusters/ModelCommand.cpp", "commands/common/CHIPCommand.cpp", - "commands/common/CHIPCommand.h", - "commands/common/Command.cpp", - "commands/common/Commands.cpp", - "commands/common/CredentialIssuerCommands.h", "include/CastingServer.h", "include/TargetEndpointInfo.h", "include/TargetVideoPlayerInfo.h", @@ -51,7 +55,10 @@ chip_data_model("tv-casting-common") { "src/TargetVideoPlayerInfo.cpp", ] - deps = [ "${chip_root}/third_party/jsoncpp" ] + deps = [ + "${chip_root}/src/app/tests/suites/commands/interaction_model", + "${chip_root}/third_party/jsoncpp", + ] if (chip_enable_transport_trace) { public_deps = diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/ClusterCommand.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/ClusterCommand.h deleted file mode 100644 index 24db51b5d1b4d9..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/ClusterCommand.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include -#include - -#include "DataModelLogger.h" -#include "ModelCommand.h" - -class ClusterCommand : public ModelCommand, public chip::app::CommandSender::Callback -{ -public: - ClusterCommand(CredentialIssuerCommands * credsIssuerConfig) : ModelCommand("command-by-id", credsIssuerConfig) - { - AddArgument("cluster-id", 0, UINT32_MAX, &mClusterId); - AddArgument("command-id", 0, UINT32_MAX, &mCommandId); - AddArgument("payload", &mPayload); - AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs); - AddArgument("suppressResponse", 0, 1, &mSuppressResponse); - AddArgument("repeat-count", 1, UINT16_MAX, &mRepeatCount); - AddArgument("repeat-delay-ms", 0, UINT16_MAX, &mRepeatDelayInMs); - ModelCommand::AddArguments(); - } - - ClusterCommand(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) : - ModelCommand("command-by-id", credsIssuerConfig), mClusterId(clusterId) - { - AddArgument("command-id", 0, UINT32_MAX, &mCommandId); - AddArgument("payload", &mPayload); - AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs); - AddArgument("suppressResponse", 0, 1, &mSuppressResponse); - AddArgument("repeat-count", 1, UINT16_MAX, &mRepeatCount); - AddArgument("repeat-delay-ms", 0, UINT16_MAX, &mRepeatDelayInMs); - ModelCommand::AddArguments(); - } - - ClusterCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig) : - ModelCommand(commandName, credsIssuerConfig) - { - AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs); - AddArgument("suppressResponse", 0, 1, &mSuppressResponse); - AddArgument("repeat-count", 1, UINT16_MAX, &mRepeatCount); - AddArgument("repeat-delay-ms", 0, UINT16_MAX, &mRepeatDelayInMs); - } - - ~ClusterCommand() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return ClusterCommand::SendCommand(device, endpointIds.at(0), mClusterId, mCommandId, mPayload); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, mClusterId, mCommandId, mPayload); - } - - /////////// CommandSender Callback Interface ///////// - virtual void OnResponse(chip::app::CommandSender * client, const chip::app::ConcreteCommandPath & path, - const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - CHIP_ERROR error = status.ToChipError(); - if (CHIP_NO_ERROR != error) - { - ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error)); - mError = error; - return; - } - - if (data != nullptr) - { - error = DataModelLogger::LogCommand(path, data); - if (CHIP_NO_ERROR != error) - { - ChipLogError(chipTool, "Response Failure: Can not decode Data"); - mError = error; - return; - } - } - } - - virtual void OnError(const chip::app::CommandSender * client, CHIP_ERROR error) override - { - ChipLogProgress(chipTool, "Error: %s", chip::ErrorStr(error)); - mError = error; - } - - virtual void OnDone(chip::app::CommandSender * client) override - { - mCommandSender.front().reset(); - mCommandSender.erase(mCommandSender.begin()); - - // If the command is repeated N times, wait for all the responses to comes in - // before exiting. - bool shouldStop = true; - if (mRepeatCount.HasValue()) - { - mRepeatCount.SetValue(static_cast(mRepeatCount.Value() - 1)); - shouldStop = mRepeatCount.Value() == 0; - } - - if (shouldStop) - { - SetCommandExitStatus(mError); - } - } - - template - CHIP_ERROR SendCommand(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, - chip::CommandId commandId, const T & value) - { - uint16_t repeatCount = mRepeatCount.ValueOr(1); - while (repeatCount--) - { - chip::app::CommandPathParams commandPath = { endpointId, 0 /* groupId */, clusterId, commandId, - (chip::app::CommandPathFlags::kEndpointIdValid) }; - - auto commandSender = std::make_unique(this, device->GetExchangeManager(), - mTimedInteractionTimeoutMs.HasValue()); - VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, value, mTimedInteractionTimeoutMs, - mSuppressResponse.ValueOr(false))); - - ReturnErrorOnFailure(commandSender->SendCommandRequest(device->GetSecureSession().Value())); - mCommandSender.push_back(std::move(commandSender)); - - if (mRepeatDelayInMs.HasValue()) - { - chip::test_utils::SleepMillis(mRepeatDelayInMs.Value()); - } - } - return CHIP_NO_ERROR; - } - - template - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::ClusterId clusterId, - chip::CommandId commandId, const T & value) - { - chip::app::CommandPathParams commandPath = { 0 /* endpoint */, groupId, clusterId, commandId, - (chip::app::CommandPathFlags::kGroupIdValid) }; - - chip::Messaging::ExchangeManager * exchangeManager = chip::app::InteractionModelEngine::GetInstance()->GetExchangeManager(); - - auto commandSender = - chip::Platform::MakeUnique(this, exchangeManager, mTimedInteractionTimeoutMs.HasValue()); - VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(commandSender->AddRequestDataNoTimedCheck(commandPath, value, mTimedInteractionTimeoutMs)); - - chip::Transport::OutgoingGroupSession session(groupId, fabricIndex); - ReturnErrorOnFailure(commandSender->SendGroupCommandRequest(chip::SessionHandle(session))); - commandSender.release(); - - return CHIP_NO_ERROR; - } - -private: - chip::ClusterId mClusterId; - chip::CommandId mCommandId; - chip::Optional mTimedInteractionTimeoutMs; - chip::Optional mSuppressResponse; - chip::Optional mRepeatCount; - chip::Optional mRepeatDelayInMs; - - CHIP_ERROR mError = CHIP_NO_ERROR; - CustomArgument mPayload; - std::vector> mCommandSender; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/ComplexArgument.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/ComplexArgument.h deleted file mode 100644 index aafc18d68d7591..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/ComplexArgument.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -constexpr uint8_t kMaxLabelLength = 100; - -class ComplexArgumentParser -{ -public: - ComplexArgumentParser() {} - - template ::value && !std::is_signed::value && - !std::is_same>, bool>::value, - int> = 0> - static CHIP_ERROR Setup(const char * label, T & request, Json::Value value) - { - if (value.isNumeric()) - { - if (chip::CanCastTo(value.asLargestUInt())) - { - request = static_cast(value.asLargestUInt()); - return CHIP_NO_ERROR; - } - } - else if (value.isString()) - { - // Check for a hex number; JSON does not support those as numbers, - // so they have to be done as strings. And we might as well support - // string-encoded unsigned numbers in general if we're doing that. - bool isHexNotation = strncmp(value.asCString(), "0x", 2) == 0 || strncmp(value.asCString(), "0X", 2) == 0; - - std::stringstream str; - isHexNotation ? str << std::hex << value.asCString() : str << value.asCString(); - uint64_t val; - str >> val; - if (!str.fail() && str.eof() && chip::CanCastTo(val)) - { - request = static_cast(val); - return CHIP_NO_ERROR; - } - } - - ChipLogError(chipTool, "Error while encoding %s as an unsigned integer.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - template ::value, bool> = true> - static CHIP_ERROR Setup(const char * label, T & request, Json::Value value) - { - if (!value.isNumeric() || !chip::CanCastTo(value.asLargestInt())) - { - ChipLogError(chipTool, "Error while encoding %s as an unsigned integer.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - request = static_cast(value.asLargestInt()); - return CHIP_NO_ERROR; - } - - template ::value, int> = 0> - static CHIP_ERROR Setup(const char * label, T & request, Json::Value value) - { - std::underlying_type_t requestValue; - ReturnErrorOnFailure(ComplexArgumentParser::Setup(label, requestValue, value)); - - request = static_cast(requestValue); - return CHIP_NO_ERROR; - } - - template - static CHIP_ERROR Setup(const char * label, chip::BitFlags & request, Json::Value & value) - { - T requestValue; - ReturnErrorOnFailure(ComplexArgumentParser::Setup(label, requestValue, value)); - - request = chip::BitFlags(requestValue); - return CHIP_NO_ERROR; - } - - template - static CHIP_ERROR Setup(const char * label, chip::Optional & request, Json::Value & value) - { - T requestValue; - ReturnErrorOnFailure(ComplexArgumentParser::Setup(label, requestValue, value)); - - request = chip::Optional(requestValue); - return CHIP_NO_ERROR; - } - - template - static CHIP_ERROR Setup(const char * label, chip::app::DataModel::Nullable & request, Json::Value & value) - { - if (value.isNull()) - { - request.SetNull(); - return CHIP_NO_ERROR; - } - - T requestValue; - ReturnErrorOnFailure(ComplexArgumentParser::Setup(label, requestValue, value)); - - request = chip::app::DataModel::Nullable(requestValue); - return CHIP_NO_ERROR; - } - - template - static CHIP_ERROR Setup(const char * label, chip::app::DataModel::List & request, Json::Value & value) - { - if (!value.isArray()) - { - ChipLogError(chipTool, "Error while encoding %s as an array.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - auto content = static_cast::type *>(chip::Platform::MemoryCalloc(value.size(), sizeof(T))); - - Json::ArrayIndex size = value.size(); - for (Json::ArrayIndex i = 0; i < size; i++) - { - char labelWithIndex[kMaxLabelLength]; - snprintf(labelWithIndex, sizeof(labelWithIndex), "%s[%d]", label, i); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithIndex, content[i], value[i])); - } - - request = chip::app::DataModel::List(content, value.size()); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR Setup(const char * label, chip::ByteSpan & request, Json::Value & value) - { - if (!value.isString()) - { - ChipLogError(chipTool, "Error while encoding %s as an octet string: Not a string.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - if (strlen(value.asCString()) % 2 != 0) - { - ChipLogError(chipTool, "Error while encoding %s as an octet string: Odd number of characters.", label); - return CHIP_ERROR_INVALID_STRING_LENGTH; - } - - size_t size = strlen(value.asCString()); - auto buffer = static_cast(chip::Platform::MemoryCalloc(size / 2, sizeof(uint8_t))); - size_t octetCount = chip::Encoding::HexToBytes(value.asCString(), size, buffer, size / 2); - - request = chip::ByteSpan(buffer, octetCount); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR Setup(const char * label, chip::CharSpan & request, Json::Value & value) - { - if (!value.isString()) - { - ChipLogError(chipTool, "Error while encoding %s as a string: Not a string.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - size_t size = strlen(value.asCString()); - auto buffer = static_cast(chip::Platform::MemoryCalloc(size, sizeof(char))); - strncpy(buffer, value.asCString(), size); - - request = chip::CharSpan(buffer, size); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR Setup(const char * label, float & request, Json::Value & value) - { - if (!value.isNumeric()) - { - ChipLogError(chipTool, "Error while encoding %s as a float: Not a number.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - request = static_cast(value.asFloat()); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR Setup(const char * label, double & request, Json::Value & value) - { - if (!value.isNumeric()) - { - ChipLogError(chipTool, "Error while encoding %s as a double: Not a number.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - request = static_cast(value.asDouble()); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR Setup(const char * label, bool & request, Json::Value & value) - { - if (!value.isBool()) - { - ChipLogError(chipTool, "Error while encoding %s as a boolean: Not a boolean.", label); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - request = value.asBool(); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR EnsureMemberExist(const char * label, const char * memberName, bool hasMember) - { - if (hasMember) - { - return CHIP_NO_ERROR; - } - - ChipLogError(chipTool, "%s is required. Should be provided as {\"%s\": value}", label, memberName); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - template - static void Finalize(T & request) - { - // Nothing to do - } - - template - static void Finalize(chip::Optional & request) - { - VerifyOrReturn(request.HasValue()); - ComplexArgumentParser::Finalize(request.Value()); - } - - template - static void Finalize(chip::app::DataModel::Nullable & request) - { - VerifyOrReturn(!request.IsNull()); - ComplexArgumentParser::Finalize(request.Value()); - } - - static void Finalize(chip::ByteSpan & request) - { - VerifyOrReturn(request.data() != nullptr); - chip::Platform::MemoryFree(reinterpret_cast(const_cast(request.data()))); - } - - static void Finalize(chip::CharSpan & request) - { - VerifyOrReturn(request.data() != nullptr); - chip::Platform::MemoryFree(reinterpret_cast(const_cast(request.data()))); - } - - template - static void Finalize(chip::app::DataModel::List & request) - { - VerifyOrReturn(request.data() != nullptr); - - size_t size = request.size(); - auto data = const_cast::type *>(request.data()); - for (size_t i = 0; i < size; i++) - { - Finalize(data[i]); - } - - chip::Platform::MemoryFree(reinterpret_cast(data)); - } - -#include -}; - -class ComplexArgument -{ -public: - virtual ~ComplexArgument() {} - - virtual CHIP_ERROR Parse(const char * label, const char * json) = 0; -}; - -template -class TypedComplexArgument : public ComplexArgument -{ -public: - TypedComplexArgument(T * request) : mRequest(request) {} - ~TypedComplexArgument() { ComplexArgumentParser::Finalize(*mRequest); } - - CHIP_ERROR Parse(const char * label, const char * json) - { - Json::Value value; - Json::Reader reader; - if (!reader.parse(json, value)) - { - std::vector errors = reader.getStructuredErrors(); - ChipLogError(chipTool, "Error parsing JSON for %s:", label); - for (auto & error : errors) - { - ChipLogError(chipTool, " %s", error.message.c_str()); - ptrdiff_t error_start = error.offset_start; - ptrdiff_t error_end = error.offset_limit; - const char * sourceText = json; - // The whole JSON string might be too long to fit in our log - // messages. Just include 30 chars before the error. - constexpr ptrdiff_t kMaxContext = 30; - std::string errorMsg; - if (error_start > kMaxContext) - { - sourceText += (error_start - kMaxContext); - error_end = kMaxContext + (error_end - error_start); - error_start = kMaxContext; - ChipLogError(chipTool, "... %s", sourceText); - // Add markers corresponding to the "... " above. - errorMsg += "----"; - } - else - { - ChipLogError(chipTool, "%s", sourceText); - } - for (ptrdiff_t i = 0; i < error_start; ++i) - { - errorMsg += "-"; - } - errorMsg += "^"; - if (error_start + 1 < error_end) - { - for (ptrdiff_t i = error_start + 1; i < error_end; ++i) - { - errorMsg += "-"; - } - errorMsg += "^"; - } - ChipLogError(chipTool, "%s", errorMsg.c_str()); - - if (error.message == "Missing ',' or '}' in object declaration" && error.offset_start > 0 && - json[error.offset_start - 1] == '0' && (json[error.offset_start] == 'x' || json[error.offset_start] == 'X')) - { - ChipLogError(chipTool, - "NOTE: JSON does not allow hex syntax beginning with 0x for numbers. Try putting the hex number " - "in quotes (like {\"name\": \"0x100\"})."); - } - } - return CHIP_ERROR_INVALID_ARGUMENT; - } - - return ComplexArgumentParser::Setup(label, *mRequest, value); - } - -private: - T * mRequest; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/CustomArgument.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/CustomArgument.h deleted file mode 100644 index 2362171aa06da9..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/CustomArgument.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include -#include -#include - -namespace { -static constexpr char kPayloadHexPrefix[] = "hex:"; -static constexpr char kPayloadSignedPrefix[] = "s:"; -static constexpr char kPayloadUnsignedPrefix[] = "u:"; -static constexpr char kPayloadFloatPrefix[] = "f:"; -static constexpr char kPayloadDoublePrefix[] = "d:"; -static constexpr size_t kPayloadHexPrefixLen = ArraySize(kPayloadHexPrefix) - 1; // ignore null character -static constexpr size_t kPayloadSignedPrefixLen = ArraySize(kPayloadSignedPrefix) - 1; // ignore null character -static constexpr size_t kPayloadUnsignedPrefixLen = ArraySize(kPayloadUnsignedPrefix) - 1; // ignore null character -static constexpr size_t kPayloadFloatPrefixLen = ArraySize(kPayloadFloatPrefix) - 1; // ignore null character -static constexpr size_t kPayloadDoublePrefixLen = ArraySize(kPayloadDoublePrefix) - 1; // ignore null character -} // namespace - -class CustomArgumentParser -{ -public: - static CHIP_ERROR Put(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - if (value.isObject()) - { - return CustomArgumentParser::PutObject(writer, tag, value); - } - - if (value.isArray()) - { - return CustomArgumentParser::PutArray(writer, tag, value); - } - - if (value.isString()) - { - if (IsOctetString(value)) - { - return CustomArgumentParser::PutOctetString(writer, tag, value); - } - if (IsUnsignedNumberPrefix(value)) - { - return CustomArgumentParser::PutUnsignedFromString(writer, tag, value); - } - if (IsSignedNumberPrefix(value)) - { - return CustomArgumentParser::PutSignedFromString(writer, tag, value); - } - if (IsFloatNumberPrefix(value)) - { - return CustomArgumentParser::PutFloatFromString(writer, tag, value); - } - if (IsDoubleNumberPrefix(value)) - { - return CustomArgumentParser::PutDoubleFromString(writer, tag, value); - } - - return CustomArgumentParser::PutCharString(writer, tag, value); - } - - if (value.isNull()) - { - return chip::app::DataModel::Encode(*writer, tag, chip::app::DataModel::Nullable()); - } - - if (value.isBool()) - { - return chip::app::DataModel::Encode(*writer, tag, value.asBool()); - } - - if (value.isUInt()) - { - return chip::app::DataModel::Encode(*writer, tag, value.asLargestUInt()); - } - - if (value.isInt()) - { - return chip::app::DataModel::Encode(*writer, tag, value.asLargestInt()); - } - - if (value.isNumeric()) - { - return chip::app::DataModel::Encode(*writer, tag, value.asDouble()); - } - - return CHIP_ERROR_NOT_IMPLEMENTED; - } - -private: - static CHIP_ERROR PutArray(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - chip::TLV::TLVType outer; - ReturnErrorOnFailure(writer->StartContainer(tag, chip::TLV::kTLVType_Array, outer)); - - Json::ArrayIndex size = value.size(); - - for (Json::ArrayIndex i = 0; i < size; i++) - { - ReturnErrorOnFailure(CustomArgumentParser::Put(writer, chip::TLV::AnonymousTag(), value[i])); - } - - return writer->EndContainer(outer); - } - - static CHIP_ERROR PutObject(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - chip::TLV::TLVType outer; - ReturnErrorOnFailure(writer->StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); - - for (auto const & id : value.getMemberNames()) - { - auto index = std::stoul(id, nullptr, 0); - VerifyOrReturnError(chip::CanCastTo(index), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(CustomArgumentParser::Put(writer, chip::TLV::ContextTag(static_cast(index)), value[id])); - } - - return writer->EndContainer(outer); - } - - static CHIP_ERROR PutOctetString(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - size_t size = strlen(value.asCString()); - VerifyOrReturnError(size % 2 == 0, CHIP_ERROR_INVALID_STRING_LENGTH); - - chip::Platform::ScopedMemoryBuffer buffer; - VerifyOrReturnError(buffer.Calloc(size / 2), CHIP_ERROR_NO_MEMORY); - size_t octetCount = chip::Encoding::HexToBytes(value.asCString() + kPayloadHexPrefixLen, size - kPayloadHexPrefixLen, - buffer.Get(), (size - kPayloadHexPrefixLen) / 2); - VerifyOrReturnError(octetCount != 0, CHIP_ERROR_NO_MEMORY); - - return chip::app::DataModel::Encode(*writer, tag, chip::ByteSpan(buffer.Get(), octetCount)); - } - - static CHIP_ERROR PutCharString(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - size_t size = strlen(value.asCString()); - return chip::app::DataModel::Encode(*writer, tag, chip::CharSpan(value.asCString(), size)); - } - - static CHIP_ERROR PutUnsignedFromString(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - char numberAsString[21]; - chip::Platform::CopyString(numberAsString, value.asCString() + kPayloadUnsignedPrefixLen); - - auto number = std::stoull(numberAsString, nullptr, 0); - return chip::app::DataModel::Encode(*writer, tag, static_cast(number)); - } - - static CHIP_ERROR PutSignedFromString(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - char numberAsString[21]; - chip::Platform::CopyString(numberAsString, value.asCString() + kPayloadSignedPrefixLen); - - auto number = std::stoll(numberAsString, nullptr, 0); - return chip::app::DataModel::Encode(*writer, tag, static_cast(number)); - } - - static CHIP_ERROR PutFloatFromString(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - char numberAsString[21]; - chip::Platform::CopyString(numberAsString, value.asCString() + kPayloadFloatPrefixLen); - - auto number = std::stof(numberAsString); - return chip::app::DataModel::Encode(*writer, tag, number); - } - - static CHIP_ERROR PutDoubleFromString(chip::TLV::TLVWriter * writer, chip::TLV::Tag tag, Json::Value & value) - { - char numberAsString[21]; - chip::Platform::CopyString(numberAsString, value.asCString() + kPayloadDoublePrefixLen); - - auto number = std::stod(numberAsString); - return chip::app::DataModel::Encode(*writer, tag, number); - } - - static bool IsOctetString(Json::Value & value) - { - return (strncmp(value.asCString(), kPayloadHexPrefix, kPayloadHexPrefixLen) == 0); - } - - static bool IsUnsignedNumberPrefix(Json::Value & value) - { - return (strncmp(value.asCString(), kPayloadUnsignedPrefix, kPayloadUnsignedPrefixLen) == 0); - } - - static bool IsSignedNumberPrefix(Json::Value & value) - { - return (strncmp(value.asCString(), kPayloadSignedPrefix, kPayloadSignedPrefixLen) == 0); - } - - static bool IsFloatNumberPrefix(Json::Value & value) - { - return (strncmp(value.asCString(), kPayloadFloatPrefix, kPayloadFloatPrefixLen) == 0); - } - - static bool IsDoubleNumberPrefix(Json::Value & value) - { - return (strncmp(value.asCString(), kPayloadDoublePrefix, kPayloadDoublePrefixLen) == 0); - } -}; - -class CustomArgument -{ -public: - ~CustomArgument() - { - if (mData != nullptr) - { - chip::Platform::MemoryFree(mData); - } - } - - CHIP_ERROR Parse(const char * label, const char * json) - { - Json::Reader reader; - Json::Value value; - reader.parse(json, value); - - mData = static_cast(chip::Platform::MemoryCalloc(sizeof(uint8_t), mDataMaxLen)); - VerifyOrReturnError(mData != nullptr, CHIP_ERROR_NO_MEMORY); - - chip::TLV::TLVWriter writer; - writer.Init(mData, mDataMaxLen); - - ReturnErrorOnFailure(CustomArgumentParser::Put(&writer, chip::TLV::AnonymousTag(), value)); - - mDataLen = writer.GetLengthWritten(); - return writer.Finalize(); - } - - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const - { - chip::TLV::TLVReader reader; - reader.Init(mData, mDataLen); - reader.Next(); - - return writer.CopyElement(tag, reader); - } - - // We trust our consumers to do the encoding of our data correctly, so don't - // need to know whether we are being encoded for a write. - static constexpr bool kIsFabricScoped = false; - -private: - uint8_t * mData = nullptr; - uint32_t mDataLen = 0; - static constexpr uint32_t mDataMaxLen = 4096; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/DataModelLogger.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/DataModelLogger.h deleted file mode 100644 index 7d725cf0a8b5ab..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/DataModelLogger.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include - -#include -#include -#include -#include -#include -#include - -class DataModelLogger -{ -public: - static CHIP_ERROR LogAttribute(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data); - static CHIP_ERROR LogCommand(const chip::app::ConcreteCommandPath & path, chip::TLV::TLVReader * data); - static CHIP_ERROR LogEvent(const chip::app::EventHeader & header, chip::TLV::TLVReader * data); - -private: - static CHIP_ERROR LogValue(const char * label, size_t indent, bool value) - { - DataModelLogger::LogString(label, indent, value ? "TRUE" : "FALSE"); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR LogValue(const char * label, size_t indent, chip::CharSpan value) - { - DataModelLogger::LogString(label, indent, std::string(value.data(), value.size())); - return CHIP_NO_ERROR; - } - - static CHIP_ERROR LogValue(const char * label, size_t indent, chip::ByteSpan value) - { - char buffer[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; - if (CHIP_NO_ERROR == - chip::Encoding::BytesToUppercaseHexString(value.data(), value.size(), &buffer[0], CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE)) - { - DataModelLogger::LogString(label, indent, buffer); - } - else - { - DataModelLogger::LogString(label, indent, - std::string("Elided value too large of size ") + std::to_string(value.size())); - } - - return CHIP_NO_ERROR; - } - - template ::value && !std::is_same>, bool>::value, int> = 0> - static CHIP_ERROR LogValue(const char * label, size_t indent, X value) - { - DataModelLogger::LogString(label, indent, std::to_string(value)); - return CHIP_NO_ERROR; - } - - template ::value, int> = 0> - static CHIP_ERROR LogValue(const char * label, size_t indent, X value) - { - DataModelLogger::LogString(label, indent, std::to_string(value)); - return CHIP_NO_ERROR; - } - - template ::value, int> = 0> - static CHIP_ERROR LogValue(const char * label, size_t indent, X value) - { - DataModelLogger::LogValue(label, indent, chip::to_underlying(value)); - return CHIP_NO_ERROR; - } - - template - static CHIP_ERROR LogValue(const char * label, size_t indent, chip::BitFlags value) - { - DataModelLogger::LogValue(label, indent, value.Raw()); - return CHIP_NO_ERROR; - } - - template - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::DataModel::DecodableList & value) - { - size_t count = 0; - CHIP_ERROR err = value.ComputeSize(&count); - if (err != CHIP_NO_ERROR) - { - return err; - } - DataModelLogger::LogString(label, indent, std::to_string(count) + " entries"); - - auto iter = value.begin(); - size_t i = 0; - while (iter.Next()) - { - ++i; - std::string itemLabel = std::string("[") + std::to_string(i) + "]"; - ReturnErrorOnFailure(DataModelLogger::LogValue(itemLabel.c_str(), indent + 1, iter.GetValue())); - } - if (iter.GetStatus() != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "List truncated due to invalid value"); - } - return iter.GetStatus(); - } - - template - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::DataModel::Nullable & value) - { - if (value.IsNull()) - { - DataModelLogger::LogString(label, indent, "null"); - } - else - { - DataModelLogger::LogValue(label, indent, value.Value()); - } - - return CHIP_NO_ERROR; - } - - template - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::Optional & value) - { - if (value.HasValue()) - { - DataModelLogger::LogValue(label, indent, value.Value()); - } - - return CHIP_NO_ERROR; - } - -#include - - static void LogString(size_t indent, const std::string string) { LogString("", indent, string); } - - static void LogString(const std::string label, size_t indent, const std::string string) - { - std::string indentation; - for (size_t i = 0; i < indent; ++i) - { - indentation.append(" "); - } - - ChipLogProgress(chipTool, "%s%s%s %s", indentation.c_str(), label.c_str(), label.size() ? ":" : "", string.c_str()); - } -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp b/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp index c886c04cf7bce7..bacbcfe98d6464 100644 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp +++ b/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.cpp @@ -16,7 +16,7 @@ * */ -#include "ModelCommand.h" +#include #include #include @@ -28,23 +28,23 @@ CHIP_ERROR ModelCommand::RunCommand() { FabricIndex fabricIndex = CastingServer::GetInstance()->CurrentFabricIndex(); - if (mNodeId == 0) + if (mDestinationId == 0) { ChipLogProgress(chipTool, "nodeId set to 0, using default for fabric %d", fabricIndex); - mNodeId = CastingServer::GetInstance()->GetVideoPlayerNodeForFabricIndex(fabricIndex); + mDestinationId = CastingServer::GetInstance()->GetVideoPlayerNodeForFabricIndex(fabricIndex); } else { // potentially change fabric index if this is not the right one for the given nodeId - fabricIndex = CastingServer::GetInstance()->GetVideoPlayerFabricIndexForNode(mNodeId); + fabricIndex = CastingServer::GetInstance()->GetVideoPlayerFabricIndexForNode(mDestinationId); } - ChipLogProgress(chipTool, "Sending command to node 0x%" PRIx64, mNodeId); + ChipLogProgress(chipTool, "Sending command to node 0x%" PRIx64, mDestinationId); - if (IsGroupId(mNodeId)) + if (IsGroupId(mDestinationId)) { - ChipLogProgress(chipTool, "Sending command to group 0x%x", GroupIdFromNodeId(mNodeId)); + ChipLogProgress(chipTool, "Sending command to group 0x%x", GroupIdFromNodeId(mDestinationId)); - return SendGroupCommand(GroupIdFromNodeId(mNodeId), fabricIndex); + return SendGroupCommand(GroupIdFromNodeId(mDestinationId), fabricIndex); } Server * server = &(chip::Server::GetInstance()); @@ -55,7 +55,7 @@ CHIP_ERROR ModelCommand::RunCommand() return CHIP_ERROR_INVALID_FABRIC_INDEX; } - PeerId peerID = fabric->GetPeerIdForNode(mNodeId); + PeerId peerID = fabric->GetPeerIdForNode(mDestinationId); server->GetCASESessionManager()->FindOrEstablishSession(peerID, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); return CHIP_NO_ERROR; diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.h deleted file mode 100644 index daab38b420bbdf..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/ModelCommand.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include "../common/CHIPCommand.h" -#include - -class ModelCommand : public CHIPCommand -{ -public: - ModelCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig) : - CHIPCommand(commandName, credsIssuerConfig), mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), - mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this) - {} - - void AddArguments() - { - AddArgument("node-id/group-id", 0, UINT64_MAX, &mNodeId); - AddArgument("endpoint-id-ignored-for-group-commands", 0, UINT16_MAX, &mEndPointId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - /////////// CHIPCommand Interface ///////// - CHIP_ERROR RunCommand() override; - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(10)); } - - virtual CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endPointIds) = 0; - - virtual CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) { return CHIP_ERROR_BAD_REQUEST; }; - - void Shutdown() override; - -protected: - chip::Optional mTimeout; - -private: - chip::NodeId mNodeId; - std::vector mEndPointId; - - static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR error); - - chip::Callback::Callback mOnDeviceConnectedCallback; - chip::Callback::Callback mOnDeviceConnectionFailureCallback; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/ReportCommand.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/ReportCommand.h deleted file mode 100644 index f99c5528892162..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/ReportCommand.h +++ /dev/null @@ -1,576 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include - -#include "DataModelLogger.h" -#include "ModelCommand.h" - -constexpr uint8_t kMaxAllowedPaths = 10; - -class ReportCommand : public ModelCommand, public chip::app::ReadClient::Callback -{ -public: - ReportCommand(const char * commandName, CredentialIssuerCommands * credsIssuerConfig) : - ModelCommand(commandName, credsIssuerConfig), mBufferedReadAdapter(*this) - {} - - virtual void OnAttributeSubscription(){}; - virtual void OnEventSubscription(){}; - - /////////// ReadClient Callback Interface ///////// - void OnAttributeData(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data, - const chip::app::StatusIB & status) override - { - CHIP_ERROR error = status.ToChipError(); - if (CHIP_NO_ERROR != error) - { - ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error)); - mError = error; - return; - } - - if (data == nullptr) - { - ChipLogError(chipTool, "Response Failure: No Data"); - mError = CHIP_ERROR_INTERNAL; - return; - } - - error = DataModelLogger::LogAttribute(path, data); - if (CHIP_NO_ERROR != error) - { - ChipLogError(chipTool, "Response Failure: Can not decode Data"); - mError = error; - return; - } - } - - void OnEventData(const chip::app::EventHeader & eventHeader, chip::TLV::TLVReader * data, - const chip::app::StatusIB * status) override - { - if (status != nullptr) - { - CHIP_ERROR error = status->ToChipError(); - if (CHIP_NO_ERROR != error) - { - ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error)); - mError = error; - return; - } - } - - if (data == nullptr) - { - ChipLogError(chipTool, "Response Failure: No Data"); - mError = CHIP_ERROR_INTERNAL; - return; - } - - CHIP_ERROR error = DataModelLogger::LogEvent(eventHeader, data); - if (CHIP_NO_ERROR != error) - { - ChipLogError(chipTool, "Response Failure: Can not decode Data"); - mError = error; - return; - } - } - - void OnError(CHIP_ERROR error) override - { - ChipLogProgress(chipTool, "Error: %s", chip::ErrorStr(error)); - mError = error; - } - - void OnDone(chip::app::ReadClient *) override - { - mReadClient.reset(); - SetCommandExitStatus(mError); - } - - void OnSubscriptionEstablished(chip::SubscriptionId subscriptionId) override { OnAttributeSubscription(); } - -protected: - CHIP_ERROR ReportAttribute(chip::DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector attributeIds, - chip::app::ReadClient::InteractionType interactionType, uint16_t minInterval = 0, - uint16_t maxInterval = 0, - const chip::Optional> & dataVersions = chip::NullOptional) - { - const size_t clusterCount = clusterIds.size(); - const size_t attributeCount = attributeIds.size(); - const size_t endpointCount = endpointIds.size(); - const size_t dataVersionsCount = dataVersions.HasValue() ? dataVersions.Value().size() : 0; - - VerifyOrReturnError(clusterCount > 0 && clusterCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(attributeCount > 0 && attributeCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(endpointCount > 0 && endpointCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(dataVersionsCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); - - const bool hasSameIdsCount = (clusterCount == attributeCount) && (clusterCount == endpointCount) && - (dataVersionsCount == 0 || clusterCount == dataVersionsCount); - const bool multipleClusters = - clusterCount > 1 && attributeCount == 1 && endpointCount == 1 && (dataVersionsCount == 0 || dataVersionsCount == 1); - const bool multipleAttributes = - attributeCount > 1 && clusterCount == 1 && endpointCount == 1 && (dataVersionsCount == 0 || dataVersionsCount == 1); - const bool multipleEndpoints = - endpointCount > 1 && clusterCount == 1 && attributeCount == 1 && (dataVersionsCount == 0 || dataVersionsCount == 1); - const bool multipleDataVersions = dataVersionsCount > 1 && clusterCount == 1 && attributeCount == 1 && endpointCount == 1; - - size_t pathsCount = 0; - if (hasSameIdsCount) - { - pathsCount = clusterCount; - } - else if (multipleClusters) - { - pathsCount = clusterCount; - } - else if (multipleAttributes) - { - pathsCount = attributeCount; - } - else if (multipleEndpoints) - { - pathsCount = endpointCount; - } - else if (multipleDataVersions) - { - pathsCount = dataVersionsCount; - } - else - { - ChipLogError( - chipTool, - "\n%sAttribute commands targeting multiple paths needs to have: \n \t * One element with multiple ids (for " - "example 1 cluster id, 1 attribute id, 2 endpoint ids)\n\t * Or the same " - "number of ids (for examples 2 cluster ids, 2 attribute ids and 2 endpoint ids).\n The current command has %u " - "cluster ids, %u attribute ids, %u endpoint ids.", - interactionType == chip::app::ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read", - static_cast(clusterCount), static_cast(attributeCount), - static_cast(endpointCount)); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ChipLogProgress(chipTool, "Sending %sAttribute to:", - interactionType == chip::app::ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read"); - - chip::app::AttributePathParams attributePathParams[kMaxAllowedPaths]; - chip::app::DataVersionFilter dataVersionFilter[kMaxAllowedPaths]; - for (size_t i = 0; i < pathsCount; i++) - { - chip::ClusterId clusterId = clusterIds.at((hasSameIdsCount || multipleClusters) ? i : 0); - chip::AttributeId attributeId = attributeIds.at((hasSameIdsCount || multipleAttributes) ? i : 0); - chip::EndpointId endpointId = endpointIds.at((hasSameIdsCount || multipleEndpoints) ? i : 0); - - ChipLogProgress(chipTool, "\tcluster " ChipLogFormatMEI ", attribute: " ChipLogFormatMEI ", endpoint %u", - ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId), endpointId); - attributePathParams[i].mClusterId = clusterId; - attributePathParams[i].mAttributeId = attributeId; - attributePathParams[i].mEndpointId = endpointId; - - if (dataVersions.HasValue()) - { - chip::DataVersion dataVersion = dataVersions.Value().at((hasSameIdsCount || multipleDataVersions) ? i : 0); - dataVersionFilter[i].mEndpointId = endpointId; - dataVersionFilter[i].mClusterId = clusterId; - dataVersionFilter[i].mDataVersion.SetValue(dataVersion); - } - } - - chip::app::ReadPrepareParams params(device->GetSecureSession().Value()); - params.mpEventPathParamsList = nullptr; - params.mEventPathParamsListSize = 0; - params.mpAttributePathParamsList = attributePathParams; - params.mAttributePathParamsListSize = pathsCount; - - if (mFabricFiltered.HasValue()) - { - params.mIsFabricFiltered = mFabricFiltered.Value(); - } - - if (dataVersions.HasValue()) - { - params.mpDataVersionFilterList = dataVersionFilter; - params.mDataVersionFilterListSize = pathsCount; - } - - if (interactionType == chip::app::ReadClient::InteractionType::Subscribe) - { - params.mMinIntervalFloorSeconds = minInterval; - params.mMaxIntervalCeilingSeconds = maxInterval; - if (mKeepSubscriptions.HasValue()) - { - params.mKeepSubscriptions = mKeepSubscriptions.Value(); - } - } - - mReadClient = std::make_unique(chip::app::InteractionModelEngine::GetInstance(), - device->GetExchangeManager(), mBufferedReadAdapter, interactionType); - return mReadClient->SendRequest(params); - } - - CHIP_ERROR ReportEvent(chip::DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector eventIds, - chip::app::ReadClient::InteractionType interactionType, uint16_t minInterval = 0, - uint16_t maxInterval = 0) - { - const size_t clusterCount = clusterIds.size(); - const size_t eventCount = eventIds.size(); - const size_t endpointCount = endpointIds.size(); - - VerifyOrReturnError(clusterCount > 0 && clusterCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(eventCount > 0 && eventCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(endpointCount > 0 && endpointCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); - - const bool hasSameIdsCount = (clusterCount == eventCount) && (clusterCount == endpointCount); - const bool multipleClusters = clusterCount > 1 && eventCount == 1 && endpointCount == 1; - const bool multipleEvents = eventCount > 1 && clusterCount == 1 && endpointCount == 1; - const bool multipleEndpoints = endpointCount > 1 && clusterCount == 1 && eventCount == 1; - - size_t pathsCount = 0; - if (hasSameIdsCount) - { - pathsCount = clusterCount; - } - else if (multipleClusters) - { - pathsCount = clusterCount; - } - else if (multipleEvents) - { - pathsCount = eventCount; - } - else if (multipleEndpoints) - { - pathsCount = endpointCount; - } - else - { - ChipLogError(chipTool, - "\n%sEvent command targeting multiple paths needs to have: \n \t * One element with multiple ids (for " - "example 1 cluster id, 1 event id, 2 endpoint ids)\n\t * Or the same " - "number of ids (for examples 2 cluster ids, 2 event ids and 2 endpoint ids).\n The current command has %u " - "cluster ids, %u event ids, %u endpoint ids.", - interactionType == chip::app::ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read", - static_cast(clusterCount), static_cast(eventCount), - static_cast(endpointCount)); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - chip::app::EventPathParams eventPathParams[kMaxAllowedPaths]; - - ChipLogProgress(chipTool, "Sending %sEvent to:", - interactionType == chip::app::ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read"); - for (size_t i = 0; i < pathsCount; i++) - { - chip::ClusterId clusterId = clusterIds.at((hasSameIdsCount || multipleClusters) ? i : 0); - chip::EventId eventId = eventIds.at((hasSameIdsCount || multipleEvents) ? i : 0); - chip::EndpointId endpointId = endpointIds.at((hasSameIdsCount || multipleEndpoints) ? i : 0); - - ChipLogProgress(chipTool, "\tcluster " ChipLogFormatMEI ", event: " ChipLogFormatMEI ", endpoint %u", - ChipLogValueMEI(clusterId), ChipLogValueMEI(eventId), endpointId); - eventPathParams[i].mClusterId = clusterId; - eventPathParams[i].mEventId = eventId; - eventPathParams[i].mEndpointId = endpointId; - } - - chip::app::ReadPrepareParams params(device->GetSecureSession().Value()); - params.mpEventPathParamsList = eventPathParams; - params.mEventPathParamsListSize = pathsCount; - params.mEventNumber = mEventNumber; - params.mpAttributePathParamsList = nullptr; - params.mAttributePathParamsListSize = 0; - - if (interactionType == chip::app::ReadClient::InteractionType::Subscribe) - { - params.mMinIntervalFloorSeconds = minInterval; - params.mMaxIntervalCeilingSeconds = maxInterval; - if (mKeepSubscriptions.HasValue()) - { - params.mKeepSubscriptions = mKeepSubscriptions.Value(); - } - } - - mReadClient = std::make_unique(chip::app::InteractionModelEngine::GetInstance(), - device->GetExchangeManager(), mBufferedReadAdapter, interactionType); - return mReadClient->SendRequest(params); - } - - // Use a 3x-longer-than-default timeout because wildcard reads can take a - // while. - chip::System::Clock::Timeout GetWaitDuration() const override - { - return mTimeout.HasValue() ? chip::System::Clock::Seconds16(mTimeout.Value()) : (ModelCommand::GetWaitDuration() * 3); - } - - std::unique_ptr mReadClient; - chip::app::BufferedReadCallback mBufferedReadAdapter; - - // mFabricFiltered is really only used by the attribute commands, but we end - // up needing it in our class's shared code. - chip::Optional mFabricFiltered; - - // mKeepSubscriptions is really only used by the subscribe commands, but we end - // up needing it in our class's shared code. - chip::Optional mKeepSubscriptions; - chip::Optional mEventNumber; - - CHIP_ERROR mError = CHIP_NO_ERROR; -}; - -class ReadAttribute : public ReportCommand -{ -public: - ReadAttribute(CredentialIssuerCommands * credsIssuerConfig) : ReportCommand("read-by-id", credsIssuerConfig) - { - AddArgument("cluster-id", 0, UINT32_MAX, &mClusterIds); - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeIds); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - ReportCommand::AddArguments(); - } - - ReadAttribute(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("read-by-id", credsIssuerConfig), mClusterIds(1, clusterId) - { - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeIds); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - ReportCommand::AddArguments(); - } - - ReadAttribute(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId, - CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("read", credsIssuerConfig), - mClusterIds(1, clusterId), mAttributeIds(1, attributeId) - { - AddArgument("attr-name", attributeName); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - ReportCommand::AddArguments(); - } - - ~ReadAttribute() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return ReportCommand::ReportAttribute(device, endpointIds, mClusterIds, mAttributeIds, - chip::app::ReadClient::InteractionType::Read, 0, 0, mDataVersion); - } - -private: - std::vector mClusterIds; - std::vector mAttributeIds; - chip::Optional> mDataVersion; -}; - -class SubscribeAttribute : public ReportCommand -{ -public: - SubscribeAttribute(CredentialIssuerCommands * credsIssuerConfig) : ReportCommand("subscribe-by-id", credsIssuerConfig) - { - AddArgument("cluster-id", 0, UINT32_MAX, &mClusterIds); - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeIds); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - ReportCommand::AddArguments(); - } - - SubscribeAttribute(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("subscribe-by-id", credsIssuerConfig), mClusterIds(1, clusterId) - { - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeIds); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - ReportCommand::AddArguments(); - } - - SubscribeAttribute(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId, - CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("subscribe", credsIssuerConfig), - mClusterIds(1, clusterId), mAttributeIds(1, attributeId) - { - AddArgument("attr-name", attributeName); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("fabric-filtered", 0, 1, &mFabricFiltered); - AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - ReportCommand::AddArguments(); - } - - ~SubscribeAttribute() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return ReportCommand::ReportAttribute(device, endpointIds, mClusterIds, mAttributeIds, - chip::app::ReadClient::InteractionType::Subscribe, mMinInterval, mMaxInterval, - mDataVersion); - } - - chip::System::Clock::Timeout GetWaitDuration() const override { return ReportCommand::GetWaitDuration(); } - - void OnAttributeSubscription() override - { - // The ReadClient instance can not be released directly into the OnAttributeSubscription - // callback since it happens to be called by ReadClient itself which is doing additional - // work after that. - chip::DeviceLayer::PlatformMgr().ScheduleWork( - [](intptr_t arg) { - auto * command = reinterpret_cast(arg); - if (!command->IsInteractive()) - { - command->mReadClient.reset(); - } - command->SetCommandExitStatus(CHIP_NO_ERROR); - }, - reinterpret_cast(this)); - } - -private: - std::vector mClusterIds; - std::vector mAttributeIds; - - uint16_t mMinInterval; - uint16_t mMaxInterval; - chip::Optional> mDataVersion; -}; - -class ReadEvent : public ReportCommand -{ -public: - ReadEvent(CredentialIssuerCommands * credsIssuerConfig) : ReportCommand("read-event-by-id", credsIssuerConfig) - { - AddArgument("cluster-id", 0, UINT32_MAX, &mClusterIds); - AddArgument("event-id", 0, UINT32_MAX, &mEventIds); - AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); - ReportCommand::AddArguments(); - } - - ReadEvent(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("read-event-by-id", credsIssuerConfig), mClusterIds(1, clusterId) - { - AddArgument("event-id", 0, UINT32_MAX, &mEventIds); - AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); - ReportCommand::AddArguments(); - } - - ReadEvent(chip::ClusterId clusterId, const char * eventName, chip::EventId eventId, - CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("read-event", credsIssuerConfig), - mClusterIds(1, clusterId), mEventIds(1, eventId) - { - AddArgument("event-name", eventName); - AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); - ReportCommand::AddArguments(); - } - - ~ReadEvent() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return ReportCommand::ReportEvent(device, endpointIds, mClusterIds, mEventIds, - chip::app::ReadClient::InteractionType::Read); - } - -private: - std::vector mClusterIds; - std::vector mEventIds; -}; - -class SubscribeEvent : public ReportCommand -{ -public: - SubscribeEvent(CredentialIssuerCommands * credsIssuerConfig) : ReportCommand("subscribe-event-by-id", credsIssuerConfig) - { - AddArgument("cluster-id", 0, UINT32_MAX, &mClusterIds); - AddArgument("event-id", 0, UINT32_MAX, &mEventIds); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); - ReportCommand::AddArguments(); - } - - SubscribeEvent(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("subscribe-event-by-id", credsIssuerConfig), mClusterIds(1, clusterId) - { - AddArgument("event-id", 0, UINT32_MAX, &mEventIds); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); - ReportCommand::AddArguments(); - } - - SubscribeEvent(chip::ClusterId clusterId, const char * eventName, chip::EventId eventId, - CredentialIssuerCommands * credsIssuerConfig) : - ReportCommand("subscribe-event", credsIssuerConfig), - mClusterIds(1, clusterId), mEventIds(1, eventId) - { - AddArgument("attr-name", eventName); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions); - AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); - ReportCommand::AddArguments(); - } - - ~SubscribeEvent() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return ReportCommand::ReportEvent(device, endpointIds, mClusterIds, mEventIds, - chip::app::ReadClient::InteractionType::Subscribe, mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override { return ReportCommand::GetWaitDuration(); } - - void OnEventSubscription() override - { - // The ReadClient instance can not be released directly into the OnEventSubscription - // callback since it happens to be called by ReadClient itself which is doing additional - // work after that. - chip::DeviceLayer::PlatformMgr().ScheduleWork( - [](intptr_t arg) { - auto * command = reinterpret_cast(arg); - if (!command->IsInteractive()) - { - command->mReadClient.reset(); - } - command->SetCommandExitStatus(CHIP_NO_ERROR); - }, - reinterpret_cast(this)); - } - -private: - std::vector mClusterIds; - std::vector mEventIds; - - uint16_t mMinInterval; - uint16_t mMaxInterval; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/SubscriptionsCommands.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/SubscriptionsCommands.h deleted file mode 100644 index b1bada5c17a280..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/SubscriptionsCommands.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include "../common/CHIPCommand.h" -#include "../common/Commands.h" - -class ShutdownSubscription : public CHIPCommand -{ -public: - ShutdownSubscription(CredentialIssuerCommands * credsIssuerConfig) : CHIPCommand("shutdown-subscription", credsIssuerConfig) - { - AddArgument("subscription-id", 0, UINT64_MAX, &mSubscriptionId); - } - - /////////// CHIPCommand Interface ///////// - CHIP_ERROR RunCommand() override - { - CHIP_ERROR err = chip::app::InteractionModelEngine::GetInstance()->ShutdownSubscription(mSubscriptionId); - SetCommandExitStatus(err); - return CHIP_NO_ERROR; - } - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); } - -private: - chip::SubscriptionId mSubscriptionId; -}; - -class ShutdownSubscriptions : public CHIPCommand -{ -public: - ShutdownSubscriptions(CredentialIssuerCommands * credsIssuerConfig) : CHIPCommand("shutdown-subscriptions", credsIssuerConfig) - { - AddArgument("fabric-index", 0, UINT64_MAX, &mFabricIndex); - AddArgument("node-id", 0, UINT64_MAX, &mNodeId); - } - - /////////// CHIPCommand Interface ///////// - CHIP_ERROR RunCommand() override - { - CHIP_ERROR err = chip::app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(mFabricIndex, mNodeId); - SetCommandExitStatus(err); - return CHIP_NO_ERROR; - } - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(10); } - -private: - chip::FabricIndex mFabricIndex; - chip::NodeId mNodeId; -}; - -void registerClusterSubscriptions(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - const char * clusterName = "Subscriptions"; - - commands_list clusterCommands = { - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - }; - - commands.Register(clusterName, clusterCommands); -} diff --git a/examples/tv-casting-app/tv-casting-common/commands/clusters/WriteAttributeCommand.h b/examples/tv-casting-app/tv-casting-common/commands/clusters/WriteAttributeCommand.h deleted file mode 100644 index dea6b9c5e159ee..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/clusters/WriteAttributeCommand.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include - -#include "DataModelLogger.h" -#include "ModelCommand.h" - -class WriteAttribute : public ModelCommand, public chip::app::WriteClient::Callback -{ -public: - WriteAttribute(CredentialIssuerCommands * credsIssuerConfig) : ModelCommand("write-by-id", credsIssuerConfig) - { - AddArgument("cluster-id", 0, UINT32_MAX, &mClusterId); - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); - AddArgument("attribute-value", &mAttributeValue); - AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("suppressResponse", 0, 1, &mSuppressResponse); - ModelCommand::AddArguments(); - } - - WriteAttribute(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) : - ModelCommand("write-by-id", credsIssuerConfig), mClusterId(clusterId) - { - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); - AddArgument("attribute-value", &mAttributeValue); - AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("suppressResponse", 0, 1, &mSuppressResponse); - ModelCommand::AddArguments(); - } - - WriteAttribute(const char * attributeName, CredentialIssuerCommands * credsIssuerConfig) : - ModelCommand("write", credsIssuerConfig) - { - AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); - AddArgument("suppressResponse", 0, 1, &mSuppressResponse); - } - - ~WriteAttribute() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), mClusterId, mAttributeId, mAttributeValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, mClusterId, mAttributeId, mAttributeValue); - } - - /////////// WriteClient Callback Interface ///////// - void OnResponse(const chip::app::WriteClient * client, const chip::app::ConcreteDataAttributePath & path, - chip::app::StatusIB status) override - { - CHIP_ERROR error = status.ToChipError(); - if (CHIP_NO_ERROR != error) - { - ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error)); - mError = error; - } - } - - void OnError(const chip::app::WriteClient * client, CHIP_ERROR error) override - { - ChipLogProgress(chipTool, "Error: %s", chip::ErrorStr(error)); - mError = error; - } - - void OnDone(chip::app::WriteClient * client) override - { - mWriteClient.reset(); - SetCommandExitStatus(mError); - } - - template - CHIP_ERROR SendCommand(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, - chip::AttributeId attributeId, const T & value) - { - ChipLogProgress(chipTool, "Sending WriteAttribute to cluster " ChipLogFormatMEI " on endpoint %u", - ChipLogValueMEI(clusterId), endpointId); - chip::app::AttributePathParams attributePathParams; - if (!device->GetSecureSession().Value()->IsGroupSession()) - { - attributePathParams.mEndpointId = endpointId; - } - attributePathParams.mClusterId = clusterId; - attributePathParams.mAttributeId = attributeId; - - mWriteClient = std::make_unique(device->GetExchangeManager(), this, mTimedInteractionTimeoutMs, - mSuppressResponse.ValueOr(false)); - - ReturnErrorOnFailure(mWriteClient->EncodeAttribute(attributePathParams, value, mDataVersion)); - - return mWriteClient->SendWriteRequest(device->GetSecureSession().Value()); - } - - template - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::ClusterId clusterId, - chip::AttributeId attributeId, const T & value) - { - - chip::app::AttributePathParams attributePathParams; - attributePathParams.mClusterId = clusterId; - attributePathParams.mAttributeId = attributeId; - - chip::Messaging::ExchangeManager * exchangeManager = chip::app::InteractionModelEngine::GetInstance()->GetExchangeManager(); - - ChipLogDetail(chipTool, "Sending Write Attribute to Group %u, on Fabric %x, for cluster %u with attributeId %u", groupId, - fabricIndex, clusterId, attributeId); - - auto writeClient = chip::Platform::MakeUnique(exchangeManager, this, mTimedInteractionTimeoutMs); - VerifyOrReturnError(writeClient != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(writeClient->EncodeAttribute(attributePathParams, value, mDataVersion)); - - chip::Transport::OutgoingGroupSession session(groupId, fabricIndex); - ReturnErrorOnFailure(writeClient->SendWriteRequest(chip::SessionHandle(session))); - writeClient.release(); - - return CHIP_NO_ERROR; - } - -private: - chip::ClusterId mClusterId; - chip::AttributeId mAttributeId; - CHIP_ERROR mError = CHIP_NO_ERROR; - chip::Optional mTimedInteractionTimeoutMs; - chip::Optional mDataVersion = chip::NullOptional; - chip::Optional mSuppressResponse; - CustomArgument mAttributeValue; - std::unique_ptr mWriteClient; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp b/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp index a6034cb1969686..3a3995484e6e75 100644 --- a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp +++ b/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp @@ -16,7 +16,7 @@ * */ -#include "CHIPCommand.h" +#include #include #include diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.h b/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.h deleted file mode 100644 index 7d8f6d09f30371..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include "Command.h" -#include -#include -#include - -#pragma once - -class PersistentStorage; - -constexpr const char kIdentityAlpha[] = "alpha"; -constexpr const char kIdentityBeta[] = "beta"; -constexpr const char kIdentityGamma[] = "gamma"; -// The null fabric commissioner is a commissioner that isn't on a fabric. -// This is a legal configuration in which the commissioner delegates -// operational communication and invocation of the commssioning complete -// command to a separate on-fabric administrator node. -// -// The null-fabric-commissioner identity is provided here to demonstrate the -// commissioner portion of such an architecture. The null-fabric-commissioner -// can carry a commissioning flow up until the point of operational channel -// (CASE) communcation. -constexpr const char kIdentityNull[] = "null-fabric-commissioner"; - -class CHIPCommand : public Command -{ -public: - using ChipDeviceCommissioner = ::chip::Controller::DeviceCommissioner; - using ChipDeviceController = ::chip::Controller::DeviceController; - using IPAddress = ::chip::Inet::IPAddress; - using NodeId = ::chip::NodeId; - using PeerId = ::chip::PeerId; - using PeerAddress = ::chip::Transport::PeerAddress; - - static constexpr uint16_t kMaxGroupsPerFabric = 5; - static constexpr uint16_t kMaxGroupKeysPerFabric = 8; - - CHIPCommand(const char * commandName, CredentialIssuerCommands * credIssuerCmds) : - Command(commandName) // , mCredIssuerCmds(credIssuerCmds) - { -#if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED - AddArgument("trace_file", &mTraceFile); - AddArgument("trace_log", 0, 1, &mTraceLog); -#endif // CHIP_CONFIG_TRANSPORT_TRACE_ENABLED - } - - /////////// Command Interface ///////// - CHIP_ERROR Run() override; - - void SetCommandExitStatus(CHIP_ERROR status) - { - mCommandExitStatus = status; - StopWaiting(); - } - -protected: - // Will be called in a setting in which it's safe to touch the CHIP - // stack. The rules for Run() are as follows: - // - // 1) If error is returned, Run() must not call SetCommandExitStatus. - // 2) If success is returned Run() must either have called - // SetCommandExitStatus() or scheduled async work that will do that. - virtual CHIP_ERROR RunCommand() = 0; - - // Get the wait duration, in seconds, before the command times out. - virtual chip::System::Clock::Timeout GetWaitDuration() const = 0; - - // Shut down the command, in case any work needs to be done after the event - // loop has been stopped. - virtual void Shutdown() {} - -private: - static void RunQueuedCommand(intptr_t commandArg); - - CHIP_ERROR mCommandExitStatus = CHIP_ERROR_INTERNAL; - - CHIP_ERROR StartWaiting(chip::System::Clock::Timeout seconds); - void StopWaiting(); - - void StartTracing(); - void StopTracing(); - -#if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED - chip::Optional mTraceFile; - chip::Optional mTraceLog; -#endif // CHIP_CONFIG_TRANSPORT_TRACE_ENABLED -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/Command.cpp b/examples/tv-casting-app/tv-casting-common/commands/common/Command.cpp deleted file mode 100644 index b67880b2f2f38e..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/common/Command.cpp +++ /dev/null @@ -1,747 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "Command.h" -#include "platform/PlatformManager.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -constexpr const char * kOptionalArgumentPrefix = "--"; -constexpr size_t kOptionalArgumentPrefixLength = 2; - -bool Command::InitArguments(int argc, char ** argv) -{ - bool isValidCommand = false; - - size_t argvExtraArgsCount = (size_t) argc; - size_t mandatoryArgsCount = 0; - size_t optionalArgsCount = 0; - for (size_t i = 0; i < mArgs.size(); i++) - { - if (mArgs[i].isOptional()) - { - optionalArgsCount++; - } - else - { - mandatoryArgsCount++; - argvExtraArgsCount--; - } - } - - VerifyOrExit((size_t)(argc) >= mandatoryArgsCount && (argvExtraArgsCount == 0 || (argvExtraArgsCount && optionalArgsCount)), - ChipLogError(chipTool, "InitArgs: Wrong arguments number: %d instead of %u", argc, - static_cast(mandatoryArgsCount))); - - // Initialize mandatory arguments - for (size_t i = 0; i < mandatoryArgsCount; i++) - { - char * arg = argv[i]; - if (!InitArgument(i, arg)) - { - ExitNow(); - } - } - - // Initialize optional arguments - // Optional arguments expect a name and a value, so i is increased by 2 on every step. - for (size_t i = mandatoryArgsCount; i < (size_t) argc; i += 2) - { - bool found = false; - for (size_t j = mandatoryArgsCount; j < mandatoryArgsCount + optionalArgsCount; j++) - { - // optional arguments starts with kOptionalArgumentPrefix - if (strlen(argv[i]) <= kOptionalArgumentPrefixLength && - strncmp(argv[i], kOptionalArgumentPrefix, kOptionalArgumentPrefixLength) != 0) - { - continue; - } - - if (strcmp(argv[i] + strlen(kOptionalArgumentPrefix), mArgs[j].name) == 0) - { - found = true; - - VerifyOrExit((size_t) argc > (i + 1), - ChipLogError(chipTool, "InitArgs: Optional argument %s missing value.", argv[i])); - if (!InitArgument(j, argv[i + 1])) - { - ExitNow(); - } - } - } - VerifyOrExit(found, ChipLogError(chipTool, "InitArgs: Optional argument %s does not exist.", argv[i])); - } - - isValidCommand = true; - -exit: - return isValidCommand; -} - -static bool ParseAddressWithInterface(const char * addressString, Command::AddressWithInterface * address) -{ - struct addrinfo hints; - struct addrinfo * result; - int ret; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_DGRAM; - ret = getaddrinfo(addressString, nullptr, &hints, &result); - if (ret < 0) - { - ChipLogError(chipTool, "Invalid address: %s", addressString); - return false; - } - - if (result->ai_family == AF_INET6) - { - struct sockaddr_in6 * addr = reinterpret_cast(result->ai_addr); - address->address = ::chip::Inet::IPAddress::FromSockAddr(*addr); - address->interfaceId = ::chip::Inet::InterfaceId(addr->sin6_scope_id); - } -#if INET_CONFIG_ENABLE_IPV4 - else if (result->ai_family == AF_INET) - { - address->address = ::chip::Inet::IPAddress::FromSockAddr(*reinterpret_cast(result->ai_addr)); - address->interfaceId = chip::Inet::InterfaceId::Null(); - } -#endif // INET_CONFIG_ENABLE_IPV4 - else - { - ChipLogError(chipTool, "Unsupported address: %s", addressString); - return false; - } - - return true; -} - -// The callback should return whether the argument is valid, for the non-null -// case. It can't directly write to isValidArgument (by closing over it) -// because in the nullable-and-null case we need to do that from this function, -// via the return value. -template -bool HandleNullableOptional(Argument & arg, char * argValue, std::function callback) -{ - if (arg.isOptional()) - { - if (arg.isNullable()) - { - arg.value = &(reinterpret_cast> *>(arg.value)->Emplace()); - } - else - { - arg.value = &(reinterpret_cast *>(arg.value)->Emplace()); - } - } - - if (arg.isNullable()) - { - auto * nullable = reinterpret_cast *>(arg.value); - if (strcmp(argValue, "null") == 0) - { - nullable->SetNull(); - return true; - } - - arg.value = &(nullable->SetNonNull()); - } - - return callback(reinterpret_cast(arg.value)); -} - -bool Command::InitArgument(size_t argIndex, char * argValue) -{ - bool isValidArgument = false; - bool isHexNotation = strncmp(argValue, "0x", 2) == 0 || strncmp(argValue, "0X", 2) == 0; - - Argument arg = mArgs.at(argIndex); - switch (arg.type) - { - case ArgumentType::Complex: { - auto complexArgument = static_cast(arg.value); - return CHIP_NO_ERROR == complexArgument->Parse(arg.name, argValue); - } - - case ArgumentType::Custom: { - auto customArgument = static_cast(arg.value); - return CHIP_NO_ERROR == customArgument->Parse(arg.name, argValue); - } - - case ArgumentType::Vector16: - case ArgumentType::Vector32: { - std::vector values; - uint64_t min = chip::CanCastTo(arg.min) ? static_cast(arg.min) : 0; - uint64_t max = arg.max; - - std::stringstream ss(argValue); - while (ss.good()) - { - std::string valueAsString; - getline(ss, valueAsString, ','); - isHexNotation = strncmp(valueAsString.c_str(), "0x", 2) == 0 || strncmp(valueAsString.c_str(), "0X", 2) == 0; - - std::stringstream subss; - isHexNotation ? subss << std::hex << valueAsString : subss << valueAsString; - - uint64_t value; - subss >> value; - VerifyOrReturnError(!subss.fail() && subss.eof() && value >= min && value <= max, false); - values.push_back(value); - } - - if (arg.type == ArgumentType::Vector16) - { - auto vectorArgument = static_cast *>(arg.value); - for (uint64_t v : values) - { - vectorArgument->push_back(static_cast(v)); - } - } - else if (arg.type == ArgumentType::Vector32 && arg.flags != Argument::kOptional) - { - auto vectorArgument = static_cast *>(arg.value); - for (uint64_t v : values) - { - vectorArgument->push_back(static_cast(v)); - } - } - else if (arg.type == ArgumentType::Vector32 && arg.flags == Argument::kOptional) - { - std::vector vectorArgument; - for (uint64_t v : values) - { - vectorArgument.push_back(static_cast(v)); - } - - auto optionalArgument = static_cast> *>(arg.value); - optionalArgument->SetValue(vectorArgument); - } - else - { - return false; - } - - return true; - } - - case ArgumentType::Attribute: { - if (arg.isOptional() || arg.isNullable()) - { - isValidArgument = false; - } - else - { - char * value = reinterpret_cast(arg.value); - isValidArgument = (strcmp(argValue, value) == 0); - } - break; - } - - case ArgumentType::String: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - *value = argValue; - return true; - }); - break; - } - - case ArgumentType::CharString: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - *value = chip::Span(argValue, strlen(argValue)); - return true; - }); - break; - } - - case ArgumentType::OctetString: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - // We support two ways to pass an octet string argument. If it happens - // to be all-ASCII, you can just pass it in. Otherwise you can pass in - // 0x followed by the hex-encoded bytes. - size_t argLen = strlen(argValue); - static constexpr char hexPrefix[] = "hex:"; - constexpr size_t prefixLen = ArraySize(hexPrefix) - 1; // Don't count the null - if (strncmp(argValue, hexPrefix, prefixLen) == 0) - { - // Hex-encoded. Decode it into a temporary buffer first, so if we - // run into errors we can do correct "argument is not valid" logging - // that actually shows the value that was passed in. After we - // determine it's valid, modify the passed-in value to hold the - // right bytes, so we don't need to worry about allocating storage - // for this somewhere else. This works because the hex - // representation is always longer than the octet string it encodes, - // so we have enough space in argValue for the decoded version. - chip::Platform::ScopedMemoryBuffer buffer; - if (!buffer.Calloc(argLen)) // Bigger than needed, but it's fine. - { - return false; - } - - size_t octetCount = chip::Encoding::HexToBytes(argValue + prefixLen, argLen - prefixLen, buffer.Get(), argLen); - if (octetCount == 0) - { - return false; - } - - memcpy(argValue, buffer.Get(), octetCount); - *value = chip::ByteSpan(chip::Uint8::from_char(argValue), octetCount); - return true; - } - - // Just ASCII. Check for the "str:" prefix. - static constexpr char strPrefix[] = "str:"; - constexpr size_t strPrefixLen = ArraySize(strPrefix) - 1; // Don't count the null - if (strncmp(argValue, strPrefix, strPrefixLen) == 0) - { - // Skip the prefix - argValue += strPrefixLen; - argLen -= strPrefixLen; - } - *value = chip::ByteSpan(chip::Uint8::from_char(argValue), argLen); - return true; - }); - break; - } - - case ArgumentType::Bool: - case ArgumentType::Number_uint8: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - // stringstream treats uint8_t as char, which is not what we want here. - uint16_t tmpValue; - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> tmpValue; - if (chip::CanCastTo(tmpValue)) - { - *value = static_cast(tmpValue); - - uint64_t min = chip::CanCastTo(arg.min) ? static_cast(arg.min) : 0; - uint64_t max = arg.max; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - } - - return false; - }); - break; - } - - case ArgumentType::Number_uint16: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> *value; - - uint64_t min = chip::CanCastTo(arg.min) ? static_cast(arg.min) : 0; - uint64_t max = arg.max; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - }); - break; - } - - case ArgumentType::Number_uint32: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> *value; - - uint64_t min = chip::CanCastTo(arg.min) ? static_cast(arg.min) : 0; - uint64_t max = arg.max; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - }); - break; - } - - case ArgumentType::Number_uint64: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> *value; - - uint64_t min = chip::CanCastTo(arg.min) ? static_cast(arg.min) : 0; - uint64_t max = arg.max; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - }); - break; - } - - case ArgumentType::Number_int8: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - // stringstream treats int8_t as char, which is not what we want here. - int16_t tmpValue; - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> tmpValue; - if (chip::CanCastTo(tmpValue)) - { - *value = static_cast(tmpValue); - - int64_t min = arg.min; - int64_t max = chip::CanCastTo(arg.max) ? static_cast(arg.max) : INT64_MAX; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - } - - return false; - }); - break; - } - - case ArgumentType::Number_int16: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> *value; - - int64_t min = arg.min; - int64_t max = chip::CanCastTo(arg.max) ? static_cast(arg.max) : INT64_MAX; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - }); - break; - } - - case ArgumentType::Number_int32: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> *value; - - int64_t min = arg.min; - int64_t max = chip::CanCastTo(arg.max) ? static_cast(arg.max) : INT64_MAX; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - }); - break; - } - - case ArgumentType::Number_int64: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - isHexNotation ? ss << std::hex << argValue : ss << argValue; - ss >> *value; - - int64_t min = arg.min; - int64_t max = chip::CanCastTo(arg.max) ? static_cast(arg.max) : INT64_MAX; - return (!ss.fail() && ss.eof() && *value >= min && *value <= max); - }); - break; - } - - case ArgumentType::Float: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - ss << argValue; - ss >> *value; - return (!ss.fail() && ss.eof()); - }); - break; - } - - case ArgumentType::Double: { - isValidArgument = HandleNullableOptional(arg, argValue, [&](auto * value) { - std::stringstream ss; - ss << argValue; - ss >> *value; - return (!ss.fail() && ss.eof()); - }); - break; - } - - case ArgumentType::Address: { - isValidArgument = HandleNullableOptional( - arg, argValue, [&](auto * value) { return ParseAddressWithInterface(argValue, value); }); - break; - } - } - - if (!isValidArgument) - { - ChipLogError(chipTool, "InitArgs: Invalid argument %s: %s", arg.name, argValue); - } - - return isValidArgument; -} - -size_t Command::AddArgument(const char * name, const char * value, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::Attribute; - arg.name = name; - arg.value = const_cast(reinterpret_cast(value)); - arg.flags = flags; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, char ** value, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::String; - arg.name = name; - arg.value = reinterpret_cast(value); - arg.flags = flags; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, chip::CharSpan * value, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::CharString; - arg.name = name; - arg.value = reinterpret_cast(value); - arg.flags = flags; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, chip::ByteSpan * value, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::OctetString; - arg.name = name; - arg.value = reinterpret_cast(value); - arg.flags = flags; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, AddressWithInterface * out, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::Address; - arg.name = name; - arg.value = reinterpret_cast(out); - arg.flags = flags; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value) -{ - Argument arg; - arg.type = ArgumentType::Vector16; - arg.name = name; - arg.value = static_cast(value); - arg.min = min; - arg.max = max; - arg.flags = 0; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value) -{ - Argument arg; - arg.type = ArgumentType::Vector32; - arg.name = name; - arg.value = static_cast(value); - arg.min = min; - arg.max = max; - arg.flags = 0; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional> * value) -{ - Argument arg; - arg.type = ArgumentType::Vector32; - arg.name = name; - arg.value = static_cast(value); - arg.min = min; - arg.max = max; - arg.flags = Argument::kOptional; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, ComplexArgument * value) -{ - Argument arg; - arg.type = ArgumentType::Complex; - arg.name = name; - arg.value = static_cast(value); - arg.flags = 0; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, CustomArgument * value) -{ - Argument arg; - arg.type = ArgumentType::Custom; - arg.name = name; - arg.value = const_cast(reinterpret_cast(value)); - arg.flags = 0; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, float min, float max, float * out, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::Float; - arg.name = name; - arg.value = reinterpret_cast(out); - arg.flags = flags; - // Ignore min/max for now; they're always +-Infinity anyway. - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, double min, double max, double * out, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::Double; - arg.name = name; - arg.value = reinterpret_cast(out); - arg.flags = flags; - // Ignore min/max for now; they're always +-Infinity anyway. - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, int64_t min, uint64_t max, void * out, ArgumentType type, uint8_t flags) -{ - Argument arg; - arg.type = type; - arg.name = name; - arg.value = out; - arg.min = min; - arg.max = max; - arg.flags = flags; - - return AddArgumentToList(std::move(arg)); -} - -size_t Command::AddArgument(const char * name, int64_t min, uint64_t max, void * out, uint8_t flags) -{ - Argument arg; - arg.type = ArgumentType::Number_uint8; - arg.name = name; - arg.value = out; - arg.min = min; - arg.max = max; - arg.flags = flags; - - return AddArgumentToList(std::move(arg)); -} - -const char * Command::GetArgumentName(size_t index) const -{ - if (index < mArgs.size()) - { - return mArgs.at(index).name; - } - - return nullptr; -} - -const char * Command::GetAttribute(void) const -{ - size_t argsCount = mArgs.size(); - for (size_t i = 0; i < argsCount; i++) - { - Argument arg = mArgs.at(i); - if (arg.type == ArgumentType::Attribute) - { - return reinterpret_cast(arg.value); - } - } - - return nullptr; -} - -const char * Command::GetEvent(void) const -{ - size_t argsCount = mArgs.size(); - for (size_t i = 0; i < argsCount; i++) - { - Argument arg = mArgs.at(i); - if (arg.type == ArgumentType::Attribute) - { - return reinterpret_cast(arg.value); - } - } - - return nullptr; -} - -size_t Command::AddArgumentToList(Argument && argument) -{ - if (argument.isOptional() || mArgs.empty() || !mArgs.back().isOptional()) - { - // Safe to just append. - mArgs.emplace_back(std::move(argument)); - return mArgs.size(); - } - - // We're inserting a non-optional arg but we already have something optional - // in the list. Insert before the first optional arg. - for (auto cur = mArgs.cbegin(), end = mArgs.cend(); cur != end; ++cur) - { - if ((*cur).isOptional()) - { - mArgs.emplace(cur, std::move(argument)); - return mArgs.size(); - } - } - - // Never reached. - VerifyOrDie(false); - return 0; -} - -void Command::ResetArguments() -{ - ChipLogError(AppServer, " -- Command::ResetArguments"); - for (size_t i = 0; i < mArgs.size(); i++) - { - const Argument arg = mArgs[i]; - const ArgumentType type = arg.type; - const uint8_t flags = arg.flags; - if (type == ArgumentType::Vector16 && flags != Argument::kOptional) - { - auto vectorArgument = static_cast *>(arg.value); - vectorArgument->clear(); - } - else if (type == ArgumentType::Vector32 && flags != Argument::kOptional) - { - auto vectorArgument = static_cast *>(arg.value); - vectorArgument->clear(); - } - else if (type == ArgumentType::Vector32 && flags == Argument::kOptional) - { - auto optionalArgument = static_cast> *>(arg.value); - if (optionalArgument->HasValue()) - { - optionalArgument->Value().clear(); - } - } - } -} diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/Command.h b/examples/tv-casting-app/tv-casting-common/commands/common/Command.h deleted file mode 100644 index 975c90297affc4..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/common/Command.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include "../clusters/ComplexArgument.h" -#include "../clusters/CustomArgument.h" -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -class Command; - -template -std::unique_ptr make_unique(Args &&... args) -{ - return std::unique_ptr(new T(std::forward(args)...)); -} - -struct movable_initializer_list -{ - movable_initializer_list(std::unique_ptr && in) : item(std::move(in)) {} - operator std::unique_ptr() const && { return std::move(item); } - mutable std::unique_ptr item; -}; - -typedef std::initializer_list commands_list; - -enum ArgumentType -{ - Number_uint8, - Number_uint16, - Number_uint32, - Number_uint64, - Number_int8, - Number_int16, - Number_int32, - Number_int64, - Float, - Double, - Bool, - String, - CharString, - OctetString, - Attribute, - Address, - Complex, - Custom, - Vector16, - Vector32, -}; - -struct Argument -{ - const char * name; - ArgumentType type; - int64_t min; - uint64_t max; - void * value; - uint8_t flags; - - enum - { - kOptional = (1 << 0), - kNullable = (1 << 1), - }; - - bool isOptional() const { return flags & kOptional; } - bool isNullable() const { return flags & kNullable; } -}; - -class Command -{ -public: - struct AddressWithInterface - { - ::chip::Inet::IPAddress address; - ::chip::Inet::InterfaceId interfaceId; - }; - - Command(const char * commandName) : mName(commandName) {} - virtual ~Command() {} - - const char * GetName(void) const { return mName; } - const char * GetAttribute(void) const; - const char * GetEvent(void) const; - const char * GetArgumentName(size_t index) const; - bool GetArgumentIsOptional(size_t index) const { return mArgs[index].isOptional(); } - size_t GetArgumentsCount(void) const { return mArgs.size(); } - - bool InitArguments(int argc, char ** argv); - size_t AddArgument(const char * name, const char * value, uint8_t flags = 0); - /** - * @brief - * Add a char string command argument - * - * @param name The name that will be displayed in the command help - * @param value A pointer to a `char *` where the argv value will be stored - * @returns The number of arguments currently added to the command - */ - size_t AddArgument(const char * name, char ** value, uint8_t flags = 0); - - /** - * Add an octet string command argument - */ - size_t AddArgument(const char * name, chip::ByteSpan * value, uint8_t flags = 0); - size_t AddArgument(const char * name, chip::Span * value, uint8_t flags = 0); - size_t AddArgument(const char * name, AddressWithInterface * out, uint8_t flags = 0); - size_t AddArgument(const char * name, ComplexArgument * value); - size_t AddArgument(const char * name, CustomArgument * value); - size_t AddArgument(const char * name, int64_t min, uint64_t max, bool * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Bool, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, int8_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_int8, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, int16_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_int16, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, int32_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_int32, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, int64_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_int64, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, uint8_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_uint8, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, uint16_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_uint16, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, uint32_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_uint32, flags); - } - size_t AddArgument(const char * name, int64_t min, uint64_t max, uint64_t * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(out), Number_uint64, flags); - } - - size_t AddArgument(const char * name, float min, float max, float * out, uint8_t flags = 0); - size_t AddArgument(const char * name, double min, double max, double * out, uint8_t flags = 0); - - size_t AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value); - size_t AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value); - size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional> * value); - - template ::value>> - size_t AddArgument(const char * name, int64_t min, uint64_t max, T * out, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast *>(out), flags); - } - - template - size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::BitFlags * out, uint8_t flags = 0) - { - // This is a terrible hack that relies on BitFlags only having the one - // mValue member. - return AddArgument(name, min, max, reinterpret_cast(out), flags); - } - - template - size_t AddArgument(const char * name, chip::Optional * value) - { - return AddArgument(name, reinterpret_cast(value), Argument::kOptional); - } - - template - size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional * value) - { - return AddArgument(name, min, max, reinterpret_cast(value), Argument::kOptional); - } - - template - size_t AddArgument(const char * name, chip::app::DataModel::Nullable * value, uint8_t flags = 0) - { - return AddArgument(name, reinterpret_cast(value), flags | Argument::kNullable); - } - - template - size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::app::DataModel::Nullable * value, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(value), flags | Argument::kNullable); - } - - size_t AddArgument(const char * name, float min, float max, chip::app::DataModel::Nullable * value, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(value), flags | Argument::kNullable); - } - - size_t AddArgument(const char * name, double min, double max, chip::app::DataModel::Nullable * value, uint8_t flags = 0) - { - return AddArgument(name, min, max, reinterpret_cast(value), flags | Argument::kNullable); - } - - void ResetArguments(); - - virtual CHIP_ERROR Run() = 0; - - bool IsInteractive() { return mIsInteractive; } - - CHIP_ERROR RunAsInteractive() - { - mIsInteractive = true; - return Run(); - } - -private: - bool InitArgument(size_t argIndex, char * argValue); - size_t AddArgument(const char * name, int64_t min, uint64_t max, void * out, ArgumentType type, uint8_t flags); - size_t AddArgument(const char * name, int64_t min, uint64_t max, void * out, uint8_t flags); - - /** - * Add the Argument to our list. This preserves the property that all - * optional arguments come at the end of the list. - */ - size_t AddArgumentToList(Argument && argument); - - const char * mName = nullptr; - bool mIsInteractive = false; - std::vector mArgs; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/Commands.cpp b/examples/tv-casting-app/tv-casting-common/commands/common/Commands.cpp deleted file mode 100644 index 0fbaeeefe7b199..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/common/Commands.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "Commands.h" - -#include "Command.h" - -#include -#include - -#include -#include - -void Commands::Register(const char * clusterName, commands_list commandsList) -{ - for (auto & command : commandsList) - { - mClusters[clusterName].push_back(std::move(command)); - } -} - -int Commands::Run(int argc, char ** argv) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - err = chip::Platform::MemoryInit(); - VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(Controller, "Init Memory failure: %s", chip::ErrorStr(err))); - - // err = mStorage.Init(); - // VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(Controller, "Init Storage failure: %s", chip::ErrorStr(err))); - - // chip::Logging::SetLogFilter(mStorage.GetLoggingLevel()); - - err = RunCommand(argc, argv); - VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(chipTool, "Run command failure: %s", chip::ErrorStr(err))); - -exit: - return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; -} - -int Commands::RunInteractive(int argc, char ** argv) -{ - CHIP_ERROR err = RunCommand(argc, argv, true); - return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE; -} - -CHIP_ERROR Commands::RunCommand(int argc, char ** argv, bool interactive) -{ - std::map::iterator cluster; - Command * command = nullptr; - - if (argc <= 1) - { - ChipLogError(chipTool, "Missing cluster name"); - ShowClusters(argv[0]); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - cluster = GetCluster(argv[1]); - if (cluster == mClusters.end()) - { - ChipLogError(chipTool, "Unknown cluster: %s", argv[1]); - ShowClusters(argv[0]); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - if (argc <= 2) - { - ChipLogError(chipTool, "Missing command name"); - ShowCluster(argv[0], argv[1], cluster->second); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - if (!IsGlobalCommand(argv[2])) - { - command = GetCommand(cluster->second, argv[2]); - if (command == nullptr) - { - ChipLogError(chipTool, "Unknown command: %s", argv[2]); - ShowCluster(argv[0], argv[1], cluster->second); - return CHIP_ERROR_INVALID_ARGUMENT; - } - } - else if (IsEventCommand(argv[2])) - { - if (argc <= 3) - { - ChipLogError(chipTool, "Missing event name"); - ShowClusterEvents(argv[0], argv[1], argv[2], cluster->second); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - command = GetGlobalCommand(cluster->second, argv[2], argv[3]); - if (command == nullptr) - { - ChipLogError(chipTool, "Unknown event: %s", argv[3]); - ShowClusterEvents(argv[0], argv[1], argv[2], cluster->second); - return CHIP_ERROR_INVALID_ARGUMENT; - } - } - else - { - if (argc <= 3) - { - ChipLogError(chipTool, "Missing attribute name"); - ShowClusterAttributes(argv[0], argv[1], argv[2], cluster->second); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - command = GetGlobalCommand(cluster->second, argv[2], argv[3]); - if (command == nullptr) - { - ChipLogError(chipTool, "Unknown attribute: %s", argv[3]); - ShowClusterAttributes(argv[0], argv[1], argv[2], cluster->second); - return CHIP_ERROR_INVALID_ARGUMENT; - } - } - - if (!command->InitArguments(argc - 3, &argv[3])) - { - ShowCommand(argv[0], argv[1], command); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - return interactive ? command->RunAsInteractive() : command->Run(); -} - -std::map::iterator Commands::GetCluster(std::string clusterName) -{ - for (auto & cluster : mClusters) - { - std::string key(cluster.first); - std::transform(key.begin(), key.end(), key.begin(), ::tolower); - if (key.compare(clusterName) == 0) - { - return mClusters.find(cluster.first); - } - } - - return mClusters.end(); -} - -Command * Commands::GetCommand(CommandsVector & commands, std::string commandName) -{ - for (auto & command : commands) - { - if (commandName.compare(command->GetName()) == 0) - { - return command.get(); - } - } - - return nullptr; -} - -Command * Commands::GetGlobalCommand(CommandsVector & commands, std::string commandName, std::string attributeName) -{ - for (auto & command : commands) - { - if (commandName.compare(command->GetName()) == 0 && attributeName.compare(command->GetAttribute()) == 0) - { - return command.get(); - } - } - - return nullptr; -} - -bool Commands::IsAttributeCommand(std::string commandName) const -{ - return commandName.compare("read") == 0 || commandName.compare("write") == 0 || commandName.compare("subscribe") == 0; -} - -bool Commands::IsEventCommand(std::string commandName) const -{ - return commandName.compare("read-event") == 0 || commandName.compare("subscribe-event") == 0; -} - -bool Commands::IsGlobalCommand(std::string commandName) const -{ - return IsAttributeCommand(commandName) || IsEventCommand(commandName); -} - -void Commands::ShowClusters(std::string executable) -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s cluster_name command_name [param1 param2 ...]\n", executable.c_str()); - fprintf(stderr, "\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - fprintf(stderr, " | Clusters: |\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - for (auto & cluster : mClusters) - { - std::string clusterName(cluster.first); - std::transform(clusterName.begin(), clusterName.end(), clusterName.begin(), - [](unsigned char c) { return std::tolower(c); }); - fprintf(stderr, " | * %-82s|\n", clusterName.c_str()); - } - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); -} - -void Commands::ShowCluster(std::string executable, std::string clusterName, CommandsVector & commands) -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s %s command_name [param1 param2 ...]\n", executable.c_str(), clusterName.c_str()); - fprintf(stderr, "\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - fprintf(stderr, " | Commands: |\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - bool readCommand = false; - bool writeCommand = false; - bool subscribeCommand = false; - bool readEventCommand = false; - bool subscribeEventCommand = false; - for (auto & command : commands) - { - bool shouldPrint = true; - - if (IsGlobalCommand(command->GetName())) - { - if (strcmp(command->GetName(), "read") == 0 && !readCommand) - { - readCommand = true; - } - else if (strcmp(command->GetName(), "write") == 0 && !writeCommand) - { - writeCommand = true; - } - else if (strcmp(command->GetName(), "subscribe") == 0 && !subscribeCommand) - { - subscribeCommand = true; - } - else if (strcmp(command->GetName(), "read-event") == 0 && !readEventCommand) - { - readEventCommand = true; - } - else if (strcmp(command->GetName(), "subscribe-event") == 0 && !subscribeEventCommand) - { - subscribeEventCommand = true; - } - else - { - shouldPrint = false; - } - } - - if (shouldPrint) - { - fprintf(stderr, " | * %-82s|\n", command->GetName()); - } - } - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); -} - -void Commands::ShowClusterAttributes(std::string executable, std::string clusterName, std::string commandName, - CommandsVector & commands) -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s %s %s attribute-name [param1 param2 ...]\n", executable.c_str(), clusterName.c_str(), - commandName.c_str()); - fprintf(stderr, "\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - fprintf(stderr, " | Attributes: |\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - for (auto & command : commands) - { - if (commandName.compare(command->GetName()) == 0) - { - fprintf(stderr, " | * %-82s|\n", command->GetAttribute()); - } - } - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); -} - -void Commands::ShowClusterEvents(std::string executable, std::string clusterName, std::string commandName, - CommandsVector & commands) -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s %s %s event-name [param1 param2 ...]\n", executable.c_str(), clusterName.c_str(), commandName.c_str()); - fprintf(stderr, "\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - fprintf(stderr, " | Events: |\n"); - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); - for (auto & command : commands) - { - if (commandName.compare(command->GetName()) == 0) - { - fprintf(stderr, " | * %-82s|\n", command->GetEvent()); - } - } - fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); -} - -void Commands::ShowCommand(std::string executable, std::string clusterName, Command * command) -{ - fprintf(stderr, "Usage:\n"); - - std::string arguments; - arguments += command->GetName(); - - size_t argumentsCount = command->GetArgumentsCount(); - for (size_t i = 0; i < argumentsCount; i++) - { - arguments += " "; - bool isOptional = command->GetArgumentIsOptional(i); - if (isOptional) - { - arguments += "[--"; - } - arguments += command->GetArgumentName(i); - if (isOptional) - { - arguments += "]"; - } - } - fprintf(stderr, " %s %s %s\n", executable.c_str(), clusterName.c_str(), arguments.c_str()); -} diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/Commands.h b/examples/tv-casting-app/tv-casting-common/commands/common/Commands.h deleted file mode 100644 index a179bc33e53ff7..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/common/Commands.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -// #include "../../config/PersistentStorage.h" -#include "Command.h" -#include - -class Commands -{ -public: - using CommandsVector = ::std::vector>; - - void Register(const char * clusterName, commands_list commandsList); - int Run(int argc, char ** argv); - int RunInteractive(int argc, char ** argv); - -private: - CHIP_ERROR RunCommand(int argc, char ** argv, bool interactive = false); - - std::map::iterator GetCluster(std::string clusterName); - Command * GetCommand(CommandsVector & commands, std::string commandName); - Command * GetGlobalCommand(CommandsVector & commands, std::string commandName, std::string attributeName); - bool IsAttributeCommand(std::string commandName) const; - bool IsEventCommand(std::string commandName) const; - bool IsGlobalCommand(std::string commandName) const; - - void ShowClusters(std::string executable); - void ShowCluster(std::string executable, std::string clusterName, CommandsVector & commands); - void ShowClusterAttributes(std::string executable, std::string clusterName, std::string commandName, CommandsVector & commands); - void ShowClusterEvents(std::string executable, std::string clusterName, std::string commandName, CommandsVector & commands); - void ShowCommand(std::string executable, std::string clusterName, Command * command); - - std::map mClusters; - // PersistentStorage mStorage; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/CredentialIssuerCommands.h b/examples/tv-casting-app/tv-casting-common/commands/common/CredentialIssuerCommands.h deleted file mode 100644 index 951ef86efceb40..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/common/CredentialIssuerCommands.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2021-2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include -#include -#include -#include -#include - -class CredentialIssuerCommands -{ -public: - virtual ~CredentialIssuerCommands() {} - - /** - * @brief - * This function is used to initialize the Credentials Issuer, if needed. - * - * @param[in] storage A reference to the storage, where the Credentials Issuer can optionally use to access the keypair in - * storage. - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - virtual CHIP_ERROR InitializeCredentialsIssuer(chip::PersistentStorageDelegate & storage) = 0; - - /** - * @brief - * This function is used to setup Device Attestation Singletons and intialize Setup/Commissioning Parameters with a custom - * Device Attestation Verifier object. - * - * @param[in] setupParams A reference to the Setup/Commissioning Parameters, to be initialized with custom Device Attestation - * Verifier. - * @param[in] trustStore A pointer to the PAA trust store to use to find valid PAA roots. - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - virtual CHIP_ERROR SetupDeviceAttestation(chip::Controller::SetupParams & setupParams, - const chip::Credentials::AttestationTrustStore * trustStore) = 0; - - virtual chip::Controller::OperationalCredentialsDelegate * GetCredentialIssuer() = 0; - - /** - * @brief - * This function is used to Generate NOC Chain for the Controller/Commissioner. Parameters follow the example implementation, - * so some parameters may not translate to the real remote Credentials Issuer policy. - * - * @param[in] nodeId The desired NodeId for the generated NOC Chain - May be optional/unused in some implementations. - * @param[in] fabricId The desired FabricId for the generated NOC Chain - May be optional/unused in some implementations. - * @param[in] cats The desired CATs for the generated NOC Chain - May be optional/unused in some implementations. - * @param[in] keypair The desired Keypair for the generated NOC Chain - May be optional/unused in some implementations. - * @param[in,out] rcac Buffer to hold the Root Certificate of the generated NOC Chain. - * @param[in,out] icac Buffer to hold the Intermediate Certificate of the generated NOC Chain. - * @param[in,out] noc Buffer to hold the Leaf Certificate of the generated NOC Chain. - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - virtual CHIP_ERROR GenerateControllerNOCChain(chip::NodeId nodeId, chip::FabricId fabricId, const chip::CATValues & cats, - chip::Crypto::P256Keypair & keypair, chip::MutableByteSpan & rcac, - chip::MutableByteSpan & icac, chip::MutableByteSpan & noc) = 0; -}; diff --git a/examples/tv-casting-app/tv-casting-common/commands/example/ExampleCredentialIssuerCommands.h b/examples/tv-casting-app/tv-casting-common/commands/example/ExampleCredentialIssuerCommands.h deleted file mode 100644 index 74646c8b5f10ba..00000000000000 --- a/examples/tv-casting-app/tv-casting-common/commands/example/ExampleCredentialIssuerCommands.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2021-2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include -#include -#include -#include -#include -#include - -class ExampleCredentialIssuerCommands : public CredentialIssuerCommands -{ -public: - CHIP_ERROR InitializeCredentialsIssuer(chip::PersistentStorageDelegate & storage) override - { - return mOpCredsIssuer.Initialize(storage); - } - CHIP_ERROR SetupDeviceAttestation(chip::Controller::SetupParams & setupParams, - const chip::Credentials::AttestationTrustStore * trustStore) override - { - chip::Credentials::SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider()); - - setupParams.deviceAttestationVerifier = chip::Credentials::GetDefaultDACVerifier(trustStore); - - return CHIP_NO_ERROR; - } - chip::Controller::OperationalCredentialsDelegate * GetCredentialIssuer() override { return &mOpCredsIssuer; } - CHIP_ERROR GenerateControllerNOCChain(chip::NodeId nodeId, chip::FabricId fabricId, const chip::CATValues & cats, - chip::Crypto::P256Keypair & keypair, chip::MutableByteSpan & rcac, - chip::MutableByteSpan & icac, chip::MutableByteSpan & noc) override - { - return mOpCredsIssuer.GenerateNOCChainAfterValidation(nodeId, fabricId, cats, keypair.Pubkey(), rcac, icac, noc); - } - -private: - chip::Controller::ExampleOperationalCredentialsIssuer mOpCredsIssuer; -}; From ada97cd703f8ad75c35a8d9201e2986d78d75753 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 14 Jun 2022 09:35:53 +0200 Subject: [PATCH 2/4] [chip-tool] Add std::vector arguments support --- .../chip-tool/commands/common/Command.cpp | 38 +++++++++++++++++++ examples/chip-tool/commands/common/Command.h | 2 + 2 files changed, 40 insertions(+) diff --git a/examples/chip-tool/commands/common/Command.cpp b/examples/chip-tool/commands/common/Command.cpp index f5828f2b138326..1931d88e39752f 100644 --- a/examples/chip-tool/commands/common/Command.cpp +++ b/examples/chip-tool/commands/common/Command.cpp @@ -305,6 +305,23 @@ bool Command::InitArgument(size_t argIndex, char * argValue) return true; } + case ArgumentType::VectorCustom: { + auto vectorArgument = static_cast *>(arg.value); + + std::stringstream ss(argValue); + while (ss.good()) + { + std::string valueAsString; + getline(ss, valueAsString, ','); + + CustomArgument * customArgument = new CustomArgument(); + vectorArgument->push_back(customArgument); + VerifyOrReturnError(CHIP_NO_ERROR == vectorArgument->back()->Parse(arg.name, valueAsString.c_str()), false); + } + + return true; + } + case ArgumentType::Attribute: { if (arg.isOptional() || arg.isNullable()) { @@ -695,6 +712,18 @@ size_t Command::AddArgument(const char * name, CustomArgument * value, const cha return AddArgumentToList(std::move(arg)); } +size_t Command::AddArgument(const char * name, std::vector * value, const char * desc) +{ + Argument arg; + arg.type = ArgumentType::VectorCustom; + arg.name = name; + arg.value = static_cast(value); + arg.flags = 0; + arg.desc = desc; + + return AddArgumentToList(std::move(arg)); +} + size_t Command::AddArgument(const char * name, float min, float max, float * out, const char * desc, uint8_t flags) { Argument arg; @@ -855,5 +884,14 @@ void Command::ResetArguments() optionalArgument->Value().clear(); } } + else if (type == ArgumentType::VectorCustom && flags != Argument::kOptional) + { + auto vectorArgument = static_cast *>(arg.value); + for (auto & customArgument : *vectorArgument) + { + delete customArgument; + } + vectorArgument->clear(); + } } } diff --git a/examples/chip-tool/commands/common/Command.h b/examples/chip-tool/commands/common/Command.h index b9a1c2bc1cb972..2a7411cf506854 100644 --- a/examples/chip-tool/commands/common/Command.h +++ b/examples/chip-tool/commands/common/Command.h @@ -73,6 +73,7 @@ enum ArgumentType VectorBool, Vector16, Vector32, + VectorCustom, }; struct Argument @@ -179,6 +180,7 @@ class Command size_t AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value, const char * desc = ""); size_t AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value, const char * desc = ""); + size_t AddArgument(const char * name, std::vector * value, const char * desc = ""); size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional> * value, const char * desc = ""); size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional> * value, From 8db6e02d06d4e8b292b9364693bb8dc1dcf28793 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 14 Jun 2022 10:18:42 +0200 Subject: [PATCH 3/4] [chip-tool] Add vector arguments supports for write interactions --- .../commands/clusters/ComplexArgument.h | 11 +- .../commands/clusters/WriteAttributeCommand.h | 158 +++++++++++++++--- examples/chip-tool/templates/commands.zapt | 51 +----- .../interaction_model/InteractionModel.cpp | 60 ++++--- .../interaction_model/InteractionModel.h | 112 ++++++++++--- 5 files changed, 276 insertions(+), 116 deletions(-) diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index d02afd9ee98741..4a033870e6c4b3 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -310,8 +310,17 @@ template class TypedComplexArgument : public ComplexArgument { public: + TypedComplexArgument() {} TypedComplexArgument(T * request) : mRequest(request) {} - ~TypedComplexArgument() { ComplexArgumentParser::Finalize(*mRequest); } + ~TypedComplexArgument() + { + if (mRequest != nullptr) + { + ComplexArgumentParser::Finalize(*mRequest); + } + } + + void SetArgument(T * request) { mRequest = request; }; CHIP_ERROR Parse(const char * label, const char * json) { diff --git a/examples/chip-tool/commands/clusters/WriteAttributeCommand.h b/examples/chip-tool/commands/clusters/WriteAttributeCommand.h index 93ca6d167fc41b..57cad5cbf7f0cc 100644 --- a/examples/chip-tool/commands/clusters/WriteAttributeCommand.h +++ b/examples/chip-tool/commands/clusters/WriteAttributeCommand.h @@ -23,23 +23,70 @@ #include "DataModelLogger.h" #include "ModelCommand.h" +template > class WriteAttribute : public InteractionModelWriter, public ModelCommand, public chip::app::WriteClient::Callback { public: WriteAttribute(CredentialIssuerCommands * credsIssuerConfig) : InteractionModelWriter(this), ModelCommand("write-by-id", credsIssuerConfig) { - AddArgument("cluster-id", 0, UINT32_MAX, &mClusterId); - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); - AddArgument("attribute-value", &mAttributeValue); + AddArgumentClusterIds(); + AddArgumentAttributeIds(); + AddArgumentAttributeValues(); AddArguments(); } WriteAttribute(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) : - InteractionModelWriter(this), ModelCommand("write-by-id", credsIssuerConfig), mClusterId(clusterId) + InteractionModelWriter(this), ModelCommand("write-by-id", credsIssuerConfig), mClusterIds(1, clusterId) { - AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId); - AddArgument("attribute-value", &mAttributeValue); + AddArgumentAttributeIds(); + AddArgumentAttributeValues(); + AddArguments(); + } + + template + WriteAttribute(chip::ClusterId clusterId, const char * attributeName, minType minValue, maxType maxValue, + chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) : + WriteAttribute(clusterId, attributeId, credsIssuerConfig) + { + AddArgumentAttributeName(attributeName); + AddArgumentAttributeValues(static_cast(minValue), static_cast(maxValue)); + AddArguments(); + } + + WriteAttribute(chip::ClusterId clusterId, const char * attributeName, float minValue, float maxValue, + chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) : + WriteAttribute(clusterId, attributeId, credsIssuerConfig) + { + AddArgumentAttributeName(attributeName); + AddArgumentAttributeValues(minValue, maxValue); + AddArguments(); + } + + WriteAttribute(chip::ClusterId clusterId, const char * attributeName, double minValue, double maxValue, + chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) : + WriteAttribute(clusterId, attributeId, credsIssuerConfig) + { + AddArgumentAttributeName(attributeName); + AddArgumentAttributeValues(minValue, maxValue); + AddArguments(); + } + + WriteAttribute(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId, + CredentialIssuerCommands * credsIssuerConfig) : + WriteAttribute(clusterId, attributeId, credsIssuerConfig) + { + AddArgumentAttributeName(attributeName); + AddArgumentAttributeValues(); + AddArguments(); + } + + WriteAttribute(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId, + TypedComplexArgument & attributeParser, CredentialIssuerCommands * credsIssuerConfig) : + WriteAttribute(clusterId, attributeId, credsIssuerConfig) + { + AddArgumentAttributeName(attributeName); + AddArgumentAttributeValues(attributeParser); AddArguments(); } @@ -47,12 +94,12 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), mClusterId, mAttributeId, mAttributeValue); + return WriteAttribute::SendCommand(device, endpointIds, mClusterIds, mAttributeIds, mAttributeValues); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, mClusterId, mAttributeId, mAttributeValue); + return WriteAttribute::SendGroupCommand(groupId, fabricIndex, mClusterIds, mAttributeIds, mAttributeValues); } /////////// WriteClient Callback Interface ///////// @@ -79,23 +126,27 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi SetCommandExitStatus(mError); } - template - CHIP_ERROR SendCommand(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, - chip::AttributeId attributeId, const T & value) + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds, + std::vector clusterIds, std::vector attributeIds, const T & values) { - ChipLogProgress(chipTool, "Sending WriteAttribute to cluster " ChipLogFormatMEI " on endpoint %u", - ChipLogValueMEI(clusterId), endpointId); - return InteractionModelWriter::WriteAttribute(device, endpointId, clusterId, attributeId, value, mTimedInteractionTimeoutMs, - mSuppressResponse, mDataVersion, mRepeatCount, mRepeatDelayInMs); + return InteractionModelWriter::WriteAttribute(device, endpointIds, clusterIds, attributeIds, values, + mTimedInteractionTimeoutMs, mSuppressResponse, mDataVersions, mRepeatCount, + mRepeatDelayInMs); } - template - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::ClusterId clusterId, - chip::AttributeId attributeId, const T & value) + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, std::vector clusterIds, + std::vector attributeIds, const T & value) { ChipLogDetail(chipTool, "Sending Write Attribute to Group %u, on Fabric %x, for cluster %u with attributeId %u", groupId, - fabricIndex, clusterId, attributeId); - return InteractionModelWriter::WriteGroupAttribute(groupId, fabricIndex, clusterId, attributeId, value, mDataVersion); + fabricIndex, clusterIds.at(0), attributeIds.at(0)); + chip::Optional dataVersion = chip::NullOptional; + if (mDataVersions.HasValue()) + { + dataVersion.SetValue(mDataVersions.Value().at(0)); + } + + return InteractionModelWriter::WriteGroupAttribute(groupId, fabricIndex, clusterIds.at(0), attributeIds.at(0), value, + dataVersion); } protected: @@ -105,11 +156,47 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi // Subclasses are responsible for calling AddArguments. } + void AddArgumentClusterIds() + { + AddArgument("cluster-ids", 0, UINT32_MAX, &mClusterIds, + "Comma-separated list of cluster ids to write to (e.g. \"6\" or \"6,0x201\")."); + } + + void AddArgumentAttributeIds() + { + AddArgument("attribute-ids", 0, UINT32_MAX, &mAttributeIds, + "Comma-separated list of attribute ids to write (e.g. \"16385\" or \"16385,0x4002\")."); + } + + void AddArgumentAttributeName(const char * attributeName) + { + AddArgument("attribute-name", attributeName, "The attribute name to write."); + } + + template + void AddArgumentAttributeValues(minType minValue, maxType maxValue) + { + AddArgument("attribute-values", minValue, maxValue, &mAttributeValues, + "Comma-separated list of attribute values to write."); + } + + void AddArgumentAttributeValues() + { + AddArgument("attribute-values", &mAttributeValues, "Comma-separated list of attribute values to write."); + } + + void AddArgumentAttributeValues(TypedComplexArgument & attributeParser) + { + attributeParser.SetArgument(&mAttributeValues); + AddArgument("attribute-values", &attributeParser, "Comma-separated list of attribute values to write."); + } + void AddArguments() { AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs, "If provided, do a timed write with the given timed interaction timeout."); - AddArgument("data-version", 0, UINT32_MAX, &mDataVersion); + AddArgument("data-version", 0, UINT32_MAX, &mDataVersions, + "Comma-separated list of data versions for the clusters being written."); AddArgument("suppressResponse", 0, 1, &mSuppressResponse); AddArgument("repeat-count", 1, UINT16_MAX, &mRepeatCount); AddArgument("repeat-delay-ms", 0, UINT16_MAX, &mRepeatDelayInMs); @@ -117,13 +204,34 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi } private: - chip::ClusterId mClusterId; - chip::AttributeId mAttributeId; + // This constructor is private as it is not intended to be used from outside the class. + WriteAttribute(chip::ClusterId clusterId, chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) : + InteractionModelWriter(this), ModelCommand("write", credsIssuerConfig), mClusterIds(1, clusterId), + mAttributeIds(1, attributeId) + {} + + std::vector mClusterIds; + std::vector mAttributeIds; + CHIP_ERROR mError = CHIP_NO_ERROR; chip::Optional mTimedInteractionTimeoutMs; - chip::Optional mDataVersion = chip::NullOptional; + chip::Optional> mDataVersions; chip::Optional mSuppressResponse; - CustomArgument mAttributeValue; chip::Optional mRepeatCount; chip::Optional mRepeatDelayInMs; + + T mAttributeValues; +}; + +template +class WriteAttributeAsComplex : public WriteAttribute +{ +public: + WriteAttributeAsComplex(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId, + CredentialIssuerCommands * credsIssuerConfig) : + WriteAttribute(clusterId, attributeName, attributeId, mAttributeParser, credsIssuerConfig) + {} + +private: + TypedComplexArgument mAttributeParser; }; diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 55939cdbf4411c..25c8a54859f471 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -64,45 +64,6 @@ private: {{/zcl_commands_source_client}} -{{#zcl_attributes_server}} -{{#if isWritable}} -class Write{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}: public WriteAttribute -{ -public: - Write{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}(CredentialIssuerCommands * credsIssuerConfig): WriteAttribute("{{asUpperCamelCase name}}", credsIssuerConfig){{#if_chip_complex}}, mComplex(&mValue){{/if_chip_complex}} - { - AddArgument("attr-name", "{{asDelimitedCommand (asUpperCamelCase name)}}"); - {{#if_chip_complex}} - AddArgument("attr-value", &mComplex); - {{else if (isString type)}} - AddArgument("attr-value", &mValue); - {{else}} - AddArgument("attr-value", {{asTypeMinValue type}}, {{asTypeMaxValue type}}, &mValue); - {{/if_chip_complex}} - WriteAttribute::AddArguments(); - } - - ~Write{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), {{asHex parent.code 8}}, {{asHex code 8}}, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, {{asHex parent.code 8}}, {{asHex code 8}}, mValue); - } - -private: - {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotOptional=true}} mValue; -{{#if_chip_complex}} - TypedComplexArgument<{{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotOptional=true}}> mComplex; -{{/if_chip_complex}} -}; - -{{/if}} -{{/zcl_attributes_server}} {{/zcl_clusters}} /*----------------------------------------------------------------------------*\ @@ -130,10 +91,16 @@ void registerCluster{{asUpperCamelCase name}}(Commands & commands, CredentialIss {{#zcl_attributes_server}} make_unique(Id, "{{asDelimitedCommand (asUpperCamelCase name)}}", Attributes::{{asUpperCamelCase name}}::Id, credsIssuerConfig), // {{/zcl_attributes_server}} - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // {{#zcl_attributes_server}} {{#if isWritable}} - make_unique(credsIssuerConfig), // + {{#if_chip_complex}} + make_unique>(Id, "{{asDelimitedCommand (asUpperCamelCase name)}}", Attributes::{{asUpperCamelCase name}}::Id, credsIssuerConfig), // + {{else if (isString type)}} + make_unique>(Id, "{{asDelimitedCommand (asUpperCamelCase name)}}", Attributes::{{asUpperCamelCase name}}::Id, credsIssuerConfig), // + {{else}} + make_unique>(Id, "{{asDelimitedCommand (asUpperCamelCase name)}}", {{asTypeMinValue type}}, {{asTypeMaxValue type}}, Attributes::{{asUpperCamelCase name}}::Id, credsIssuerConfig), // + {{/if_chip_complex}} {{/if}} {{/zcl_attributes_server}} make_unique(Id, credsIssuerConfig), // @@ -166,7 +133,7 @@ void registerClusterAny(Commands & commands, CredentialIssuerCommands * credsIss commands_list clusterCommands = { make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique>(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp index 91cb73b35ef714..526106c56d4a07 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp @@ -174,16 +174,14 @@ void InteractionModel::OnDone(CommandSender * client) } } -CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::vector endpointIds, - std::vector clusterIds, std::vector attributeIds, - ReadClient::InteractionType interactionType, uint16_t minInterval, - uint16_t maxInterval, const Optional & fabricFiltered, - const Optional> & dataVersions, - const Optional & keepSubscriptions) +CHIP_ERROR InteractionModelConfig::GetAttributePaths(std::vector endpointIds, std::vector clusterIds, + std::vector attributeIds, + const Optional> & dataVersions, + AttributePathsConfig & pathsConfig) { + const size_t endpointCount = endpointIds.size(); const size_t clusterCount = clusterIds.size(); const size_t attributeCount = attributeIds.size(); - const size_t endpointCount = endpointIds.size(); const size_t dataVersionsCount = dataVersions.HasValue() ? dataVersions.Value().size() : 0; VerifyOrReturnError(clusterCount > 0 && clusterCount <= kMaxAllowedPaths, CHIP_ERROR_INVALID_ARGUMENT); @@ -193,6 +191,7 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v const bool hasSameIdsCount = (clusterCount == attributeCount) && (clusterCount == endpointCount) && (dataVersionsCount == 0 || clusterCount == dataVersionsCount); + const bool multipleClusters = clusterCount > 1 && attributeCount == 1 && endpointCount == 1 && (dataVersionsCount == 0 || dataVersionsCount == 1); const bool multipleAttributes = @@ -225,21 +224,17 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v else { ChipLogError(chipTool, - "\n%sAttribute commands targetting multiple paths needs to have: \n \t * One element with multiple ids (for " + "\nCommand targetting multiple paths needs to have: \n \t * One element with multiple ids (for " "example 1 cluster id, 1 attribute id, 2 endpoint ids)\n\t * Or the same " "number of ids (for examples 2 cluster ids, 2 attribute ids and 2 endpoint ids).\n The current command has %u " "cluster ids, %u attribute ids, %u endpoint ids.", - interactionType == ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read", static_cast(clusterCount), static_cast(attributeCount), static_cast(endpointCount)); return CHIP_ERROR_INVALID_ARGUMENT; } - ChipLogProgress(chipTool, - "Sending %sAttribute to:", interactionType == ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read"); + pathsConfig.count = pathsCount; - AttributePathParams attributePathParams[kMaxAllowedPaths]; - DataVersionFilter dataVersionFilter[kMaxAllowedPaths]; for (size_t i = 0; i < pathsCount; i++) { ClusterId clusterId = clusterIds.at((hasSameIdsCount || multipleClusters) ? i : 0); @@ -251,33 +246,50 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v if (clusterId != kInvalidClusterId) { - attributePathParams[i].mClusterId = clusterId; + pathsConfig.attributePathParams[i].mClusterId = clusterId; } if (attributeId != kInvalidAttributeId) { - attributePathParams[i].mAttributeId = attributeId; + pathsConfig.attributePathParams[i].mAttributeId = attributeId; } if (endpointId != kInvalidEndpointId) { - attributePathParams[i].mEndpointId = endpointId; + pathsConfig.attributePathParams[i].mEndpointId = endpointId; } if (dataVersions.HasValue()) { - DataVersion dataVersion = dataVersions.Value().at((hasSameIdsCount || multipleDataVersions) ? i : 0); - dataVersionFilter[i].mEndpointId = endpointId; - dataVersionFilter[i].mClusterId = clusterId; - dataVersionFilter[i].mDataVersion.SetValue(dataVersion); + DataVersion dataVersion = dataVersions.Value().at((hasSameIdsCount || multipleDataVersions) ? i : 0); + pathsConfig.dataVersionFilter[i].mEndpointId = endpointId; + pathsConfig.dataVersionFilter[i].mClusterId = clusterId; + pathsConfig.dataVersionFilter[i].mDataVersion.SetValue(dataVersion); } } + return CHIP_NO_ERROR; +} + +CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::vector endpointIds, + std::vector clusterIds, std::vector attributeIds, + ReadClient::InteractionType interactionType, uint16_t minInterval, + uint16_t maxInterval, const Optional & fabricFiltered, + const Optional> & dataVersions, + const Optional & keepSubscriptions) +{ + InteractionModelConfig::AttributePathsConfig pathsConfig; + ReturnErrorOnFailure( + InteractionModelConfig::GetAttributePaths(endpointIds, clusterIds, attributeIds, dataVersions, pathsConfig)); + + ChipLogProgress(chipTool, + "Sending %sAttribute to:", interactionType == ReadClient::InteractionType::Subscribe ? "Subscribe" : "Read"); + ReadPrepareParams params(device->GetSecureSession().Value()); params.mpEventPathParamsList = nullptr; params.mEventPathParamsListSize = 0; - params.mpAttributePathParamsList = attributePathParams; - params.mAttributePathParamsListSize = pathsCount; + params.mpAttributePathParamsList = pathsConfig.attributePathParams; + params.mAttributePathParamsListSize = pathsConfig.count; if (fabricFiltered.HasValue()) { @@ -286,8 +298,8 @@ CHIP_ERROR InteractionModelReports::ReportAttribute(DeviceProxy * device, std::v if (dataVersions.HasValue()) { - params.mpDataVersionFilterList = dataVersionFilter; - params.mDataVersionFilterListSize = pathsCount; + params.mpDataVersionFilterList = pathsConfig.dataVersionFilter; + params.mDataVersionFilterListSize = pathsConfig.count; } if (interactionType == ReadClient::InteractionType::Subscribe) diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index b588aa9de762c2..a5853fdd3ac560 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -29,6 +29,22 @@ constexpr uint8_t kMaxAllowedPaths = 10; +class InteractionModelConfig +{ +public: + struct AttributePathsConfig + { + size_t count = 0; + chip::app::AttributePathParams attributePathParams[kMaxAllowedPaths]; + chip::app::DataVersionFilter dataVersionFilter[kMaxAllowedPaths]; + }; + + static CHIP_ERROR GetAttributePaths(std::vector endpointIds, std::vector clusterIds, + std::vector attributeIds, + const chip::Optional> & dataVersions, + AttributePathsConfig & pathsConfig); +}; + class InteractionModelReports { public: @@ -172,38 +188,37 @@ class InteractionModelWriter protected: template - CHIP_ERROR WriteAttribute(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, - chip::AttributeId attributeId, const T & value, - const chip::Optional & timedInteractionTimeoutMs = chip::NullOptional, - const chip::Optional & suppressResponse = chip::NullOptional, - const chip::Optional & dataVersion = chip::NullOptional, - const chip::Optional & repeatCount = chip::NullOptional, - const chip::Optional & repeatDelayInMs = chip::NullOptional) + CHIP_ERROR WriteAttribute(chip::DeviceProxy * device, std::vector endpointIds, + std::vector clusterIds, std::vector attributeIds, + const std::vector & values, + const chip::Optional & timedInteractionTimeoutMs = chip::NullOptional, + const chip::Optional & suppressResponse = chip::NullOptional, + const chip::Optional> & dataVersions = chip::NullOptional, + const chip::Optional & repeatCount = chip::NullOptional, + const chip::Optional & repeatDelayInMs = chip::NullOptional) { + InteractionModelConfig::AttributePathsConfig pathsConfig; + ReturnErrorOnFailure( + InteractionModelConfig::GetAttributePaths(endpointIds, clusterIds, attributeIds, dataVersions, pathsConfig)); + + VerifyOrReturnError(pathsConfig.count == values.size() || values.size() == 1, CHIP_ERROR_INVALID_ARGUMENT); + uint16_t repeat = repeatCount.ValueOr(1); while (repeat--) { - chip::app::AttributePathParams attributePathParams; - if (endpointId != chip::kInvalidEndpointId) - { - attributePathParams.mEndpointId = endpointId; - } - - if (clusterId != chip::kInvalidClusterId) - { - attributePathParams.mClusterId = clusterId; - } - - if (attributeId != chip::kInvalidAttributeId) - { - attributePathParams.mAttributeId = attributeId; - } mWriteClient = std::make_unique(device->GetExchangeManager(), &mChunkedWriteCallback, timedInteractionTimeoutMs, suppressResponse.ValueOr(false)); VerifyOrReturnError(mWriteClient != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(mWriteClient->EncodeAttribute(attributePathParams, value, dataVersion)); + for (uint8_t i = 0; i < pathsConfig.count; i++) + { + auto & path = pathsConfig.attributePathParams[i]; + auto & dataVersion = pathsConfig.dataVersionFilter[i].mDataVersion; + const T & value = i >= values.size() ? values.at(0) : values.at(i); + ReturnErrorOnFailure(EncodeAttribute(path, dataVersion, value)); + } + ReturnErrorOnFailure(mWriteClient->SendWriteRequest(device->GetSecureSession().Value())); if (repeatDelayInMs.HasValue()) @@ -215,6 +230,28 @@ class InteractionModelWriter return CHIP_NO_ERROR; } + template + CHIP_ERROR WriteAttribute(chip::DeviceProxy * device, std::vector endpointIds, + std::vector clusterIds, std::vector attributeIds, const T & value, + const chip::Optional & timedInteractionTimeoutMs = chip::NullOptional, + const chip::Optional & suppressResponse = chip::NullOptional, + const chip::Optional> & dataVersions = chip::NullOptional, + const chip::Optional & repeatCount = chip::NullOptional, + const chip::Optional & repeatDelayInMs = chip::NullOptional) + { + std::vector values = { value }; + return WriteAttribute(device, endpointIds, clusterIds, attributeIds, values, timedInteractionTimeoutMs, suppressResponse, + dataVersions, repeatCount, repeatDelayInMs); + } + + template + CHIP_ERROR WriteGroupAttribute(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::ClusterId clusterId, + chip::AttributeId attributeId, const std::vector & value, + const chip::Optional & dataVersion = chip::NullOptional) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + template CHIP_ERROR WriteGroupAttribute(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::ClusterId clusterId, chip::AttributeId attributeId, const T & value, @@ -246,6 +283,21 @@ class InteractionModelWriter std::unique_ptr mWriteClient; chip::app::ChunkedWriteCallback mChunkedWriteCallback; + +private: + template + CHIP_ERROR EncodeAttribute(const chip::app::AttributePathParams & path, const chip::Optional & dataVersion, + T value, typename std::enable_if::value>::type * = 0) + { + return mWriteClient->EncodeAttribute(path, value, dataVersion); + } + + template + CHIP_ERROR EncodeAttribute(const chip::app::AttributePathParams & path, const chip::Optional & dataVersion, + T value, typename std::enable_if::value>::type * = 0) + { + return mWriteClient->EncodeAttribute(path, *value, dataVersion); + } }; class InteractionModel : public InteractionModelReports, @@ -293,7 +345,19 @@ class InteractionModel : public InteractionModelReports, chip::DeviceProxy * device = GetDevice(identity); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INCORRECT_STATE); - return InteractionModelWriter::WriteAttribute(device, endpointId, clusterId, attributeId, value, timedInteractionTimeoutMs); + std::vector endpointIds = { endpointId }; + std::vector clusterIds = { clusterId }; + std::vector attributeIds = { attributeId }; + + chip::Optional> optionalDataVersions; + if (dataVersion.HasValue()) + { + std::vector dataVersions = { dataVersion.Value() }; + optionalDataVersions.SetValue(dataVersions); + } + + return InteractionModelWriter::WriteAttribute(device, endpointIds, clusterIds, attributeIds, value, + timedInteractionTimeoutMs, suppressResponse, optionalDataVersions); } template From dc5012abc90964a10a0781559f88446142b8ffa2 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 14 Jun 2022 16:04:45 +0200 Subject: [PATCH 4/4] Update generated code --- .../zap-generated/cluster/Commands.h | 20898 +++++----------- 1 file changed, 6595 insertions(+), 14303 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 0ff724199e486f..f9349d380f31ff 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -221,1263 +221,1745 @@ | Events: | | \*----------------------------------------------------------------------------*/ -class WritePowerConfigurationMainsAlarmMask : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster DeviceTemperatureConfiguration | 0x0002 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentTemperature | 0x0000 | +| * MinTempExperienced | 0x0001 | +| * MaxTempExperienced | 0x0002 | +| * OverTempTotalDwell | 0x0003 | +| * DeviceTempAlarmMask | 0x0010 | +| * LowTempThreshold | 0x0011 | +| * HighTempThreshold | 0x0012 | +| * LowTempDwellTripPoint | 0x0013 | +| * HighTempDwellTripPoint | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster Identify | 0x0003 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Identify | 0x00 | +| * TriggerEffect | 0x40 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * IdentifyTime | 0x0000 | +| * IdentifyType | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command Identify + */ +class IdentifyIdentify : public ClusterCommand { public: - WritePowerConfigurationMainsAlarmMask(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MainsAlarmMask", credsIssuerConfig) + IdentifyIdentify(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("identify", credsIssuerConfig) { - AddArgument("attr-name", "mains-alarm-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("IdentifyTime", 0, UINT16_MAX, &mRequest.identifyTime); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationMainsAlarmMask() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000003, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000003, 0x00000000, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Identify::Commands::Identify::Type mRequest; }; -class WritePowerConfigurationMainsVoltageMinThreshold : public WriteAttribute +/* + * Command TriggerEffect + */ +class IdentifyTriggerEffect : public ClusterCommand { public: - WritePowerConfigurationMainsVoltageMinThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MainsVoltageMinThreshold", credsIssuerConfig) + IdentifyTriggerEffect(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("trigger-effect", credsIssuerConfig) { - AddArgument("attr-name", "mains-voltage-min-threshold"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); + AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationMainsVoltageMinThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000011, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000003, 0x00000040, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000011, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000003, 0x00000040, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::Identify::Commands::TriggerEffect::Type mRequest; }; -class WritePowerConfigurationMainsVoltageMaxThreshold : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster Groups | 0x0004 | +|------------------------------------------------------------------------------| +| Commands: | | +| * AddGroup | 0x00 | +| * ViewGroup | 0x01 | +| * GetGroupMembership | 0x02 | +| * RemoveGroup | 0x03 | +| * RemoveAllGroups | 0x04 | +| * AddGroupIfIdentifying | 0x05 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NameSupport | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command AddGroup + */ +class GroupsAddGroup : public ClusterCommand { public: - WritePowerConfigurationMainsVoltageMaxThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MainsVoltageMaxThreshold", credsIssuerConfig) + GroupsAddGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-group", credsIssuerConfig) { - AddArgument("attr-name", "mains-voltage-max-threshold"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupName", &mRequest.groupName); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationMainsVoltageMaxThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000012, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000012, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000000, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::Groups::Commands::AddGroup::Type mRequest; }; -class WritePowerConfigurationMainsVoltageDwellTrip : public WriteAttribute +/* + * Command ViewGroup + */ +class GroupsViewGroup : public ClusterCommand { public: - WritePowerConfigurationMainsVoltageDwellTrip(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MainsVoltageDwellTrip", credsIssuerConfig) + GroupsViewGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-group", credsIssuerConfig) { - AddArgument("attr-name", "mains-voltage-dwell-trip"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationMainsVoltageDwellTrip() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000001, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::Groups::Commands::ViewGroup::Type mRequest; }; -class WritePowerConfigurationBatteryManufacturer : public WriteAttribute +/* + * Command GetGroupMembership + */ +class GroupsGetGroupMembership : public ClusterCommand { public: - WritePowerConfigurationBatteryManufacturer(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryManufacturer", credsIssuerConfig) + GroupsGetGroupMembership(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-group-membership", credsIssuerConfig), mComplex_GroupList(&mRequest.groupList) { - AddArgument("attr-name", "battery-manufacturer"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupList", &mComplex_GroupList); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryManufacturer() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000030, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000030, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000002, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::Groups::Commands::GetGroupMembership::Type mRequest; + TypedComplexArgument> mComplex_GroupList; }; -class WritePowerConfigurationBatterySize : public WriteAttribute +/* + * Command RemoveGroup + */ +class GroupsRemoveGroup : public ClusterCommand { public: - WritePowerConfigurationBatterySize(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatterySize", credsIssuerConfig) + GroupsRemoveGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-group", credsIssuerConfig) { - AddArgument("attr-name", "battery-size"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatterySize() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000031, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000031, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000003, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Groups::Commands::RemoveGroup::Type mRequest; }; -class WritePowerConfigurationBatteryAhrRating : public WriteAttribute +/* + * Command RemoveAllGroups + */ +class GroupsRemoveAllGroups : public ClusterCommand { public: - WritePowerConfigurationBatteryAhrRating(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryAhrRating", credsIssuerConfig) + GroupsRemoveAllGroups(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-all-groups", credsIssuerConfig) { - AddArgument("attr-name", "battery-ahr-rating"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryAhrRating() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000032, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000032, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000004, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type mRequest; }; -class WritePowerConfigurationBatteryQuantity : public WriteAttribute +/* + * Command AddGroupIfIdentifying + */ +class GroupsAddGroupIfIdentifying : public ClusterCommand { public: - WritePowerConfigurationBatteryQuantity(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryQuantity", credsIssuerConfig) + GroupsAddGroupIfIdentifying(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-group-if-identifying", credsIssuerConfig) { - AddArgument("attr-name", "battery-quantity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupName", &mRequest.groupName); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryQuantity() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000033, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000033, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000005, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Type mRequest; }; -class WritePowerConfigurationBatteryRatedVoltage : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster Scenes | 0x0005 | +|------------------------------------------------------------------------------| +| Commands: | | +| * AddScene | 0x00 | +| * ViewScene | 0x01 | +| * RemoveScene | 0x02 | +| * RemoveAllScenes | 0x03 | +| * StoreScene | 0x04 | +| * RecallScene | 0x05 | +| * GetSceneMembership | 0x06 | +| * EnhancedAddScene | 0x40 | +| * EnhancedViewScene | 0x41 | +| * CopyScene | 0x42 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SceneCount | 0x0000 | +| * CurrentScene | 0x0001 | +| * CurrentGroup | 0x0002 | +| * SceneValid | 0x0003 | +| * NameSupport | 0x0004 | +| * LastConfiguredBy | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command AddScene + */ +class ScenesAddScene : public ClusterCommand { public: - WritePowerConfigurationBatteryRatedVoltage(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryRatedVoltage", credsIssuerConfig) + ScenesAddScene(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { - AddArgument("attr-name", "battery-rated-voltage"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("SceneName", &mRequest.sceneName); + AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryRatedVoltage() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000034, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000034, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000000, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::AddScene::Type mRequest; + TypedComplexArgument> + mComplex_ExtensionFieldSets; }; -class WritePowerConfigurationBatteryAlarmMask : public WriteAttribute +/* + * Command ViewScene + */ +class ScenesViewScene : public ClusterCommand { public: - WritePowerConfigurationBatteryAlarmMask(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryAlarmMask", credsIssuerConfig) + ScenesViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-scene", credsIssuerConfig) { - AddArgument("attr-name", "battery-alarm-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryAlarmMask() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000035, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000035, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000001, mRequest); + } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::ViewScene::Type mRequest; }; -class WritePowerConfigurationBatteryVoltageMinThreshold : public WriteAttribute +/* + * Command RemoveScene + */ +class ScenesRemoveScene : public ClusterCommand { public: - WritePowerConfigurationBatteryVoltageMinThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryVoltageMinThreshold", credsIssuerConfig) + ScenesRemoveScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-scene", credsIssuerConfig) { - AddArgument("attr-name", "battery-voltage-min-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryVoltageMinThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000036, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000036, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000002, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::RemoveScene::Type mRequest; }; -class WritePowerConfigurationBatteryVoltageThreshold1 : public WriteAttribute +/* + * Command RemoveAllScenes + */ +class ScenesRemoveAllScenes : public ClusterCommand { public: - WritePowerConfigurationBatteryVoltageThreshold1(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryVoltageThreshold1", credsIssuerConfig) + ScenesRemoveAllScenes(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-all-scenes", credsIssuerConfig) { - AddArgument("attr-name", "battery-voltage-threshold1"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryVoltageThreshold1() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000037, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000037, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000003, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type mRequest; }; -class WritePowerConfigurationBatteryVoltageThreshold2 : public WriteAttribute +/* + * Command StoreScene + */ +class ScenesStoreScene : public ClusterCommand { public: - WritePowerConfigurationBatteryVoltageThreshold2(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryVoltageThreshold2", credsIssuerConfig) + ScenesStoreScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("store-scene", credsIssuerConfig) { - AddArgument("attr-name", "battery-voltage-threshold2"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryVoltageThreshold2() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000038, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000038, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000004, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::StoreScene::Type mRequest; }; -class WritePowerConfigurationBatteryVoltageThreshold3 : public WriteAttribute +/* + * Command RecallScene + */ +class ScenesRecallScene : public ClusterCommand { public: - WritePowerConfigurationBatteryVoltageThreshold3(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryVoltageThreshold3", credsIssuerConfig) + ScenesRecallScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("recall-scene", credsIssuerConfig) { - AddArgument("attr-name", "battery-voltage-threshold3"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryVoltageThreshold3() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000039, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000039, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000005, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::RecallScene::Type mRequest; }; -class WritePowerConfigurationBatteryPercentageMinThreshold : public WriteAttribute +/* + * Command GetSceneMembership + */ +class ScenesGetSceneMembership : public ClusterCommand { public: - WritePowerConfigurationBatteryPercentageMinThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryPercentageMinThreshold", credsIssuerConfig) + ScenesGetSceneMembership(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-scene-membership", credsIssuerConfig) { - AddArgument("attr-name", "battery-percentage-min-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryPercentageMinThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000003A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000003A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000006, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type mRequest; }; -class WritePowerConfigurationBatteryPercentageThreshold1 : public WriteAttribute +/* + * Command EnhancedAddScene + */ +class ScenesEnhancedAddScene : public ClusterCommand { public: - WritePowerConfigurationBatteryPercentageThreshold1(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryPercentageThreshold1", credsIssuerConfig) + ScenesEnhancedAddScene(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { - AddArgument("attr-name", "battery-percentage-threshold1"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("SceneName", &mRequest.sceneName); + AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryPercentageThreshold1() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000003B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000040, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000003B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000040, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type mRequest; + TypedComplexArgument> + mComplex_ExtensionFieldSets; }; -class WritePowerConfigurationBatteryPercentageThreshold2 : public WriteAttribute +/* + * Command EnhancedViewScene + */ +class ScenesEnhancedViewScene : public ClusterCommand { public: - WritePowerConfigurationBatteryPercentageThreshold2(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryPercentageThreshold2", credsIssuerConfig) + ScenesEnhancedViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enhanced-view-scene", credsIssuerConfig) { - AddArgument("attr-name", "battery-percentage-threshold2"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryPercentageThreshold2() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000003C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000041, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000003C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000041, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type mRequest; }; -class WritePowerConfigurationBatteryPercentageThreshold3 : public WriteAttribute +/* + * Command CopyScene + */ +class ScenesCopyScene : public ClusterCommand { public: - WritePowerConfigurationBatteryPercentageThreshold3(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BatteryPercentageThreshold3", credsIssuerConfig) + ScenesCopyScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("copy-scene", credsIssuerConfig) { - AddArgument("attr-name", "battery-percentage-threshold3"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("GroupIdFrom", 0, UINT16_MAX, &mRequest.groupIdFrom); + AddArgument("SceneIdFrom", 0, UINT8_MAX, &mRequest.sceneIdFrom); + AddArgument("GroupIdTo", 0, UINT16_MAX, &mRequest.groupIdTo); + AddArgument("SceneIdTo", 0, UINT8_MAX, &mRequest.sceneIdTo); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBatteryPercentageThreshold3() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000003D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000042, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000003D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000042, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Scenes::Commands::CopyScene::Type mRequest; }; -class WritePowerConfigurationBattery2Manufacturer : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster OnOff | 0x0006 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Off | 0x00 | +| * On | 0x01 | +| * Toggle | 0x02 | +| * OffWithEffect | 0x40 | +| * OnWithRecallGlobalScene | 0x41 | +| * OnWithTimedOff | 0x42 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * OnOff | 0x0000 | +| * GlobalSceneControl | 0x4000 | +| * OnTime | 0x4001 | +| * OffWaitTime | 0x4002 | +| * StartUpOnOff | 0x4003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command Off + */ +class OnOffOff : public ClusterCommand { public: - WritePowerConfigurationBattery2Manufacturer(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2Manufacturer", credsIssuerConfig) + OnOffOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off", credsIssuerConfig) { - AddArgument("attr-name", "battery2manufacturer"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2Manufacturer() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000050, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000050, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000000, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::OnOff::Commands::Off::Type mRequest; }; -class WritePowerConfigurationBattery2Size : public WriteAttribute +/* + * Command On + */ +class OnOffOn : public ClusterCommand { public: - WritePowerConfigurationBattery2Size(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2Size", credsIssuerConfig) + OnOffOn(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on", credsIssuerConfig) { - AddArgument("attr-name", "battery2size"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2Size() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000051, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000051, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000001, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::OnOff::Commands::On::Type mRequest; }; -class WritePowerConfigurationBattery2AhrRating : public WriteAttribute +/* + * Command Toggle + */ +class OnOffToggle : public ClusterCommand { public: - WritePowerConfigurationBattery2AhrRating(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2AhrRating", credsIssuerConfig) + OnOffToggle(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("toggle", credsIssuerConfig) { - AddArgument("attr-name", "battery2ahr-rating"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2AhrRating() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000052, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000052, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000002, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::OnOff::Commands::Toggle::Type mRequest; }; -class WritePowerConfigurationBattery2Quantity : public WriteAttribute +/* + * Command OffWithEffect + */ +class OnOffOffWithEffect : public ClusterCommand { public: - WritePowerConfigurationBattery2Quantity(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2Quantity", credsIssuerConfig) + OnOffOffWithEffect(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off-with-effect", credsIssuerConfig) { - AddArgument("attr-name", "battery2quantity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("EffectId", 0, UINT8_MAX, &mRequest.effectId); + AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2Quantity() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000053, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000040, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000053, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000040, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type mRequest; }; -class WritePowerConfigurationBattery2RatedVoltage : public WriteAttribute +/* + * Command OnWithRecallGlobalScene + */ +class OnOffOnWithRecallGlobalScene : public ClusterCommand { public: - WritePowerConfigurationBattery2RatedVoltage(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2RatedVoltage", credsIssuerConfig) + OnOffOnWithRecallGlobalScene(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("on-with-recall-global-scene", credsIssuerConfig) { - AddArgument("attr-name", "battery2rated-voltage"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2RatedVoltage() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000054, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000041, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000054, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000041, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type mRequest; }; -class WritePowerConfigurationBattery2AlarmMask : public WriteAttribute +/* + * Command OnWithTimedOff + */ +class OnOffOnWithTimedOff : public ClusterCommand { public: - WritePowerConfigurationBattery2AlarmMask(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2AlarmMask", credsIssuerConfig) + OnOffOnWithTimedOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on-with-timed-off", credsIssuerConfig) { - AddArgument("attr-name", "battery2alarm-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("OnOffControl", 0, UINT8_MAX, &mRequest.onOffControl); + AddArgument("OnTime", 0, UINT16_MAX, &mRequest.onTime); + AddArgument("OffWaitTime", 0, UINT16_MAX, &mRequest.offWaitTime); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2AlarmMask() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000055, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000042, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000055, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000042, mRequest); + } private: - uint8_t mValue; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type mRequest; }; -class WritePowerConfigurationBattery2VoltageMinThreshold : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster OnOffSwitchConfiguration | 0x0007 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SwitchType | 0x0000 | +| * SwitchActions | 0x0010 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster LevelControl | 0x0008 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MoveToLevel | 0x00 | +| * Move | 0x01 | +| * Step | 0x02 | +| * Stop | 0x03 | +| * MoveToLevelWithOnOff | 0x04 | +| * MoveWithOnOff | 0x05 | +| * StepWithOnOff | 0x06 | +| * StopWithOnOff | 0x07 | +| * MoveToClosestFrequency | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentLevel | 0x0000 | +| * RemainingTime | 0x0001 | +| * MinLevel | 0x0002 | +| * MaxLevel | 0x0003 | +| * CurrentFrequency | 0x0004 | +| * MinFrequency | 0x0005 | +| * MaxFrequency | 0x0006 | +| * Options | 0x000F | +| * OnOffTransitionTime | 0x0010 | +| * OnLevel | 0x0011 | +| * OnTransitionTime | 0x0012 | +| * OffTransitionTime | 0x0013 | +| * DefaultMoveRate | 0x0014 | +| * StartUpCurrentLevel | 0x4000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command MoveToLevel + */ +class LevelControlMoveToLevel : public ClusterCommand { public: - WritePowerConfigurationBattery2VoltageMinThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2VoltageMinThreshold", credsIssuerConfig) + LevelControlMoveToLevel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-level", credsIssuerConfig) { - AddArgument("attr-name", "battery2voltage-min-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Level", 0, UINT8_MAX, &mRequest.level); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); + AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2VoltageMinThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000056, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000056, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000000, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type mRequest; }; -class WritePowerConfigurationBattery2VoltageThreshold1 : public WriteAttribute +/* + * Command Move + */ +class LevelControlMove : public ClusterCommand { public: - WritePowerConfigurationBattery2VoltageThreshold1(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2VoltageThreshold1", credsIssuerConfig) + LevelControlMove(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move", credsIssuerConfig) { - AddArgument("attr-name", "battery2voltage-threshold1"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); + AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2VoltageThreshold1() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000057, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000057, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000001, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::Move::Type mRequest; }; -class WritePowerConfigurationBattery2VoltageThreshold2 : public WriteAttribute +/* + * Command Step + */ +class LevelControlStep : public ClusterCommand { public: - WritePowerConfigurationBattery2VoltageThreshold2(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2VoltageThreshold2", credsIssuerConfig) + LevelControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) { - AddArgument("attr-name", "battery2voltage-threshold2"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); + AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2VoltageThreshold2() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000058, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000058, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000002, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::Step::Type mRequest; }; -class WritePowerConfigurationBattery2VoltageThreshold3 : public WriteAttribute +/* + * Command Stop + */ +class LevelControlStop : public ClusterCommand { public: - WritePowerConfigurationBattery2VoltageThreshold3(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2VoltageThreshold3", credsIssuerConfig) + LevelControlStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { - AddArgument("attr-name", "battery2voltage-threshold3"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); + AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2VoltageThreshold3() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000059, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000059, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000003, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::Stop::Type mRequest; }; -class WritePowerConfigurationBattery2PercentageMinThreshold : public WriteAttribute +/* + * Command MoveToLevelWithOnOff + */ +class LevelControlMoveToLevelWithOnOff : public ClusterCommand { public: - WritePowerConfigurationBattery2PercentageMinThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2PercentageMinThreshold", credsIssuerConfig) + LevelControlMoveToLevelWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-level-with-on-off", credsIssuerConfig) { - AddArgument("attr-name", "battery2percentage-min-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Level", 0, UINT8_MAX, &mRequest.level); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2PercentageMinThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000005A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000005A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000004, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type mRequest; }; -class WritePowerConfigurationBattery2PercentageThreshold1 : public WriteAttribute +/* + * Command MoveWithOnOff + */ +class LevelControlMoveWithOnOff : public ClusterCommand { public: - WritePowerConfigurationBattery2PercentageThreshold1(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2PercentageThreshold1", credsIssuerConfig) + LevelControlMoveWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-with-on-off", credsIssuerConfig) { - AddArgument("attr-name", "battery2percentage-threshold1"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2PercentageThreshold1() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000005B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000005B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000005, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type mRequest; }; -class WritePowerConfigurationBattery2PercentageThreshold2 : public WriteAttribute +/* + * Command StepWithOnOff + */ +class LevelControlStepWithOnOff : public ClusterCommand { public: - WritePowerConfigurationBattery2PercentageThreshold2(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2PercentageThreshold2", credsIssuerConfig) + LevelControlStepWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-with-on-off", credsIssuerConfig) { - AddArgument("attr-name", "battery2percentage-threshold2"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2PercentageThreshold2() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000005C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000005C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000006, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type mRequest; }; -class WritePowerConfigurationBattery2PercentageThreshold3 : public WriteAttribute +/* + * Command StopWithOnOff + */ +class LevelControlStopWithOnOff : public ClusterCommand { public: - WritePowerConfigurationBattery2PercentageThreshold3(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery2PercentageThreshold3", credsIssuerConfig) + LevelControlStopWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-with-on-off", credsIssuerConfig) { - AddArgument("attr-name", "battery2percentage-threshold3"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery2PercentageThreshold3() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000005D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000005D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000007, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type mRequest; }; -class WritePowerConfigurationBattery3Manufacturer : public WriteAttribute +/* + * Command MoveToClosestFrequency + */ +class LevelControlMoveToClosestFrequency : public ClusterCommand { public: - WritePowerConfigurationBattery3Manufacturer(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3Manufacturer", credsIssuerConfig) + LevelControlMoveToClosestFrequency(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-closest-frequency", credsIssuerConfig) { - AddArgument("attr-name", "battery3manufacturer"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("Frequency", 0, UINT16_MAX, &mRequest.frequency); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3Manufacturer() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000070, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000070, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000008, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type mRequest; }; -class WritePowerConfigurationBattery3Size : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster Alarms | 0x0009 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetAlarm | 0x00 | +| * ResetAllAlarms | 0x01 | +| * GetAlarm | 0x02 | +| * ResetAlarmLog | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * AlarmCount | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command ResetAlarm + */ +class AlarmsResetAlarm : public ClusterCommand { public: - WritePowerConfigurationBattery3Size(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3Size", credsIssuerConfig) + AlarmsResetAlarm(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-alarm", credsIssuerConfig) { - AddArgument("attr-name", "battery3size"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("AlarmCode", 0, UINT8_MAX, &mRequest.alarmCode); + AddArgument("ClusterId", 0, UINT32_MAX, &mRequest.clusterId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3Size() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000071, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000071, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000000, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Alarms::Commands::ResetAlarm::Type mRequest; }; -class WritePowerConfigurationBattery3AhrRating : public WriteAttribute +/* + * Command ResetAllAlarms + */ +class AlarmsResetAllAlarms : public ClusterCommand { public: - WritePowerConfigurationBattery3AhrRating(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3AhrRating", credsIssuerConfig) + AlarmsResetAllAlarms(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-all-alarms", credsIssuerConfig) { - AddArgument("attr-name", "battery3ahr-rating"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3AhrRating() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000072, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000072, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000001, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::Alarms::Commands::ResetAllAlarms::Type mRequest; }; -class WritePowerConfigurationBattery3Quantity : public WriteAttribute +/* + * Command GetAlarm + */ +class AlarmsGetAlarm : public ClusterCommand { public: - WritePowerConfigurationBattery3Quantity(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3Quantity", credsIssuerConfig) + AlarmsGetAlarm(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-alarm", credsIssuerConfig) { - AddArgument("attr-name", "battery3quantity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3Quantity() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000073, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000073, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000002, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Alarms::Commands::GetAlarm::Type mRequest; }; -class WritePowerConfigurationBattery3RatedVoltage : public WriteAttribute +/* + * Command ResetAlarmLog + */ +class AlarmsResetAlarmLog : public ClusterCommand { public: - WritePowerConfigurationBattery3RatedVoltage(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3RatedVoltage", credsIssuerConfig) + AlarmsResetAlarmLog(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-alarm-log", credsIssuerConfig) { - AddArgument("attr-name", "battery3rated-voltage"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3RatedVoltage() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000074, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000074, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000003, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::Alarms::Commands::ResetAlarmLog::Type mRequest; }; -class WritePowerConfigurationBattery3AlarmMask : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster Time | 0x000A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Time | 0x0000 | +| * TimeStatus | 0x0001 | +| * TimeZone | 0x0002 | +| * DstStart | 0x0003 | +| * DstEnd | 0x0004 | +| * DstShift | 0x0005 | +| * StandardTime | 0x0006 | +| * LocalTime | 0x0007 | +| * LastSetTime | 0x0008 | +| * ValidUntilTime | 0x0009 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster BinaryInputBasic | 0x000F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActiveText | 0x0004 | +| * Description | 0x001C | +| * InactiveText | 0x002E | +| * OutOfService | 0x0051 | +| * Polarity | 0x0054 | +| * PresentValue | 0x0055 | +| * Reliability | 0x0067 | +| * StatusFlags | 0x006F | +| * ApplicationType | 0x0100 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster PowerProfile | 0x001A | +|------------------------------------------------------------------------------| +| Commands: | | +| * PowerProfileRequest | 0x00 | +| * PowerProfileStateRequest | 0x01 | +| * GetPowerProfilePriceResponse | 0x02 | +| * GetOverallSchedulePriceResponse | 0x03 | +| * EnergyPhasesScheduleNotification | 0x04 | +| * EnergyPhasesScheduleResponse | 0x05 | +| * PowerProfileScheduleConstraintsRequest | 0x06 | +| * EnergyPhasesScheduleStateRequest | 0x07 | +| * GetPowerProfilePriceExtendedResponse | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TotalProfileNum | 0x0000 | +| * MultipleScheduling | 0x0001 | +| * EnergyFormatting | 0x0002 | +| * EnergyRemote | 0x0003 | +| * ScheduleMode | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command PowerProfileRequest + */ +class PowerProfilePowerProfileRequest : public ClusterCommand { public: - WritePowerConfigurationBattery3AlarmMask(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3AlarmMask", credsIssuerConfig) + PowerProfilePowerProfileRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("power-profile-request", credsIssuerConfig) { - AddArgument("attr-name", "battery3alarm-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3AlarmMask() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000075, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000075, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000000, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::PowerProfileRequest::Type mRequest; }; -class WritePowerConfigurationBattery3VoltageMinThreshold : public WriteAttribute +/* + * Command PowerProfileStateRequest + */ +class PowerProfilePowerProfileStateRequest : public ClusterCommand { public: - WritePowerConfigurationBattery3VoltageMinThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3VoltageMinThreshold", credsIssuerConfig) + PowerProfilePowerProfileStateRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("power-profile-state-request", credsIssuerConfig) { - AddArgument("attr-name", "battery3voltage-min-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3VoltageMinThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000076, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000076, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000001, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::PowerProfileStateRequest::Type mRequest; }; -class WritePowerConfigurationBattery3VoltageThreshold1 : public WriteAttribute +/* + * Command GetPowerProfilePriceResponse + */ +class PowerProfileGetPowerProfilePriceResponse : public ClusterCommand { public: - WritePowerConfigurationBattery3VoltageThreshold1(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3VoltageThreshold1", credsIssuerConfig) + PowerProfileGetPowerProfilePriceResponse(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-power-profile-price-response", credsIssuerConfig) { - AddArgument("attr-name", "battery3voltage-threshold1"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + AddArgument("Currency", 0, UINT16_MAX, &mRequest.currency); + AddArgument("Price", 0, UINT32_MAX, &mRequest.price); + AddArgument("PriceTrailingDigit", 0, UINT8_MAX, &mRequest.priceTrailingDigit); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3VoltageThreshold1() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000077, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000077, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000002, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::GetPowerProfilePriceResponse::Type mRequest; }; -class WritePowerConfigurationBattery3VoltageThreshold2 : public WriteAttribute +/* + * Command GetOverallSchedulePriceResponse + */ +class PowerProfileGetOverallSchedulePriceResponse : public ClusterCommand { public: - WritePowerConfigurationBattery3VoltageThreshold2(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3VoltageThreshold2", credsIssuerConfig) + PowerProfileGetOverallSchedulePriceResponse(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-overall-schedule-price-response", credsIssuerConfig) { - AddArgument("attr-name", "battery3voltage-threshold2"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Currency", 0, UINT16_MAX, &mRequest.currency); + AddArgument("Price", 0, UINT32_MAX, &mRequest.price); + AddArgument("PriceTrailingDigit", 0, UINT8_MAX, &mRequest.priceTrailingDigit); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3VoltageThreshold2() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000078, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000078, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000003, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::GetOverallSchedulePriceResponse::Type mRequest; }; -class WritePowerConfigurationBattery3VoltageThreshold3 : public WriteAttribute +/* + * Command EnergyPhasesScheduleNotification + */ +class PowerProfileEnergyPhasesScheduleNotification : public ClusterCommand { public: - WritePowerConfigurationBattery3VoltageThreshold3(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3VoltageThreshold3", credsIssuerConfig) + PowerProfileEnergyPhasesScheduleNotification(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("energy-phases-schedule-notification", credsIssuerConfig), + mComplex_ScheduledPhases(&mRequest.scheduledPhases) { - AddArgument("attr-name", "battery3voltage-threshold3"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + AddArgument("NumOfScheduledPhases", 0, UINT8_MAX, &mRequest.numOfScheduledPhases); + AddArgument("ScheduledPhases", &mComplex_ScheduledPhases); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3VoltageThreshold3() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x00000079, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000004) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x00000079, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000004) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000004, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::EnergyPhasesScheduleNotification::Type mRequest; + TypedComplexArgument> + mComplex_ScheduledPhases; }; -class WritePowerConfigurationBattery3PercentageMinThreshold : public WriteAttribute +/* + * Command EnergyPhasesScheduleResponse + */ +class PowerProfileEnergyPhasesScheduleResponse : public ClusterCommand { public: - WritePowerConfigurationBattery3PercentageMinThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3PercentageMinThreshold", credsIssuerConfig) + PowerProfileEnergyPhasesScheduleResponse(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("energy-phases-schedule-response", credsIssuerConfig), mComplex_ScheduledPhases(&mRequest.scheduledPhases) { - AddArgument("attr-name", "battery3percentage-min-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + AddArgument("NumOfScheduledPhases", 0, UINT8_MAX, &mRequest.numOfScheduledPhases); + AddArgument("ScheduledPhases", &mComplex_ScheduledPhases); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3PercentageMinThreshold() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000007A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000005) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000007A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000005) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000005, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::EnergyPhasesScheduleResponse::Type mRequest; + TypedComplexArgument> + mComplex_ScheduledPhases; }; -class WritePowerConfigurationBattery3PercentageThreshold1 : public WriteAttribute +/* + * Command PowerProfileScheduleConstraintsRequest + */ +class PowerProfilePowerProfileScheduleConstraintsRequest : public ClusterCommand { public: - WritePowerConfigurationBattery3PercentageThreshold1(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3PercentageThreshold1", credsIssuerConfig) + PowerProfilePowerProfileScheduleConstraintsRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("power-profile-schedule-constraints-request", credsIssuerConfig) { - AddArgument("attr-name", "battery3percentage-threshold1"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3PercentageThreshold1() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000007B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000006) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000007B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000006) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000006, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::PowerProfileScheduleConstraintsRequest::Type mRequest; }; -class WritePowerConfigurationBattery3PercentageThreshold2 : public WriteAttribute +/* + * Command EnergyPhasesScheduleStateRequest + */ +class PowerProfileEnergyPhasesScheduleStateRequest : public ClusterCommand { public: - WritePowerConfigurationBattery3PercentageThreshold2(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3PercentageThreshold2", credsIssuerConfig) + PowerProfileEnergyPhasesScheduleStateRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("energy-phases-schedule-state-request", credsIssuerConfig) { - AddArgument("attr-name", "battery3percentage-threshold2"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3PercentageThreshold2() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000007C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000007) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000007C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000007) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000007, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::EnergyPhasesScheduleStateRequest::Type mRequest; }; -class WritePowerConfigurationBattery3PercentageThreshold3 : public WriteAttribute +/* + * Command GetPowerProfilePriceExtendedResponse + */ +class PowerProfileGetPowerProfilePriceExtendedResponse : public ClusterCommand { public: - WritePowerConfigurationBattery3PercentageThreshold3(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Battery3PercentageThreshold3", credsIssuerConfig) - { - AddArgument("attr-name", "battery3percentage-threshold3"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + PowerProfileGetPowerProfilePriceExtendedResponse(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-power-profile-price-extended-response", credsIssuerConfig) + { + AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + AddArgument("Currency", 0, UINT16_MAX, &mRequest.currency); + AddArgument("Price", 0, UINT32_MAX, &mRequest.price); + AddArgument("PriceTrailingDigit", 0, UINT8_MAX, &mRequest.priceTrailingDigit); + ClusterCommand::AddArguments(); } - ~WritePowerConfigurationBattery3PercentageThreshold3() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000001, 0x0000007D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000008) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000001, 0x0000007D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000008) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000008, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::PowerProfile::Commands::GetPowerProfilePriceExtendedResponse::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster DeviceTemperatureConfiguration | 0x0002 | +| Cluster ApplianceControl | 0x001B | |------------------------------------------------------------------------------| | Commands: | | +| * ExecutionOfACommand | 0x00 | +| * SignalState | 0x01 | +| * WriteFunctions | 0x02 | +| * OverloadPauseResume | 0x03 | +| * OverloadPause | 0x04 | +| * OverloadWarning | 0x05 | |------------------------------------------------------------------------------| | Attributes: | | -| * CurrentTemperature | 0x0000 | -| * MinTempExperienced | 0x0001 | -| * MaxTempExperienced | 0x0002 | -| * OverTempTotalDwell | 0x0003 | -| * DeviceTempAlarmMask | 0x0010 | -| * LowTempThreshold | 0x0011 | -| * HighTempThreshold | 0x0012 | -| * LowTempDwellTripPoint | 0x0013 | -| * HighTempDwellTripPoint | 0x0014 | +| * StartTime | 0x0000 | +| * FinishTime | 0x0001 | +| * RemainingTime | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -1487,260 +1969,197 @@ class WritePowerConfigurationBattery3PercentageThreshold3 : public WriteAttribut | Events: | | \*----------------------------------------------------------------------------*/ -class WriteDeviceTemperatureConfigurationDeviceTempAlarmMask : public WriteAttribute +/* + * Command ExecutionOfACommand + */ +class ApplianceControlExecutionOfACommand : public ClusterCommand { public: - WriteDeviceTemperatureConfigurationDeviceTempAlarmMask(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("DeviceTempAlarmMask", credsIssuerConfig) + ApplianceControlExecutionOfACommand(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("execution-of-acommand", credsIssuerConfig) { - AddArgument("attr-name", "device-temp-alarm-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("CommandId", 0, UINT8_MAX, &mRequest.commandId); + ClusterCommand::AddArguments(); } - ~WriteDeviceTemperatureConfigurationDeviceTempAlarmMask() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000002, 0x00000010, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000002, 0x00000010, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDeviceTemperatureConfigurationLowTempThreshold : public WriteAttribute -{ -public: - WriteDeviceTemperatureConfigurationLowTempThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LowTempThreshold", credsIssuerConfig) - { - AddArgument("attr-name", "low-temp-threshold"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDeviceTemperatureConfigurationLowTempThreshold() {} + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000000) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000002, 0x00000011, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000002, 0x00000011, mValue); - } - -private: - int16_t mValue; -}; - -class WriteDeviceTemperatureConfigurationHighTempThreshold : public WriteAttribute -{ -public: - WriteDeviceTemperatureConfigurationHighTempThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("HighTempThreshold", credsIssuerConfig) - { - AddArgument("attr-name", "high-temp-threshold"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDeviceTemperatureConfigurationHighTempThreshold() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000002, 0x00000012, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000000) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000002, 0x00000012, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000000, mRequest); } private: - int16_t mValue; + chip::app::Clusters::ApplianceControl::Commands::ExecutionOfACommand::Type mRequest; }; -class WriteDeviceTemperatureConfigurationLowTempDwellTripPoint : public WriteAttribute +/* + * Command SignalState + */ +class ApplianceControlSignalState : public ClusterCommand { public: - WriteDeviceTemperatureConfigurationLowTempDwellTripPoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LowTempDwellTripPoint", credsIssuerConfig) + ApplianceControlSignalState(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("signal-state", credsIssuerConfig) { - AddArgument("attr-name", "low-temp-dwell-trip-point"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteDeviceTemperatureConfigurationLowTempDwellTripPoint() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000002, 0x00000013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000002, 0x00000013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000001, mRequest); } private: - uint32_t mValue; + chip::app::Clusters::ApplianceControl::Commands::SignalState::Type mRequest; }; -class WriteDeviceTemperatureConfigurationHighTempDwellTripPoint : public WriteAttribute +/* + * Command WriteFunctions + */ +class ApplianceControlWriteFunctions : public ClusterCommand { public: - WriteDeviceTemperatureConfigurationHighTempDwellTripPoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("HighTempDwellTripPoint", credsIssuerConfig) + ApplianceControlWriteFunctions(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("write-functions", credsIssuerConfig), mComplex_FunctionData(&mRequest.functionData) { - AddArgument("attr-name", "high-temp-dwell-trip-point"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("FunctionId", 0, UINT16_MAX, &mRequest.functionId); + AddArgument("FunctionDataType", 0, UINT8_MAX, &mRequest.functionDataType); + AddArgument("FunctionData", &mComplex_FunctionData); + ClusterCommand::AddArguments(); } - ~WriteDeviceTemperatureConfigurationHighTempDwellTripPoint() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000002, 0x00000014, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000002, 0x00000014, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000002, mRequest); } private: - uint32_t mValue; + chip::app::Clusters::ApplianceControl::Commands::WriteFunctions::Type mRequest; + TypedComplexArgument> mComplex_FunctionData; }; -/*----------------------------------------------------------------------------*\ -| Cluster Identify | 0x0003 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Identify | 0x00 | -| * TriggerEffect | 0x40 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * IdentifyTime | 0x0000 | -| * IdentifyType | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command Identify + * Command OverloadPauseResume */ -class IdentifyIdentify : public ClusterCommand +class ApplianceControlOverloadPauseResume : public ClusterCommand { public: - IdentifyIdentify(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("identify", credsIssuerConfig) + ApplianceControlOverloadPauseResume(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("overload-pause-resume", credsIssuerConfig) { - AddArgument("IdentifyTime", 0, UINT16_MAX, &mRequest.identifyTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000003, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000003, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000003, mRequest); } private: - chip::app::Clusters::Identify::Commands::Identify::Type mRequest; + chip::app::Clusters::ApplianceControl::Commands::OverloadPauseResume::Type mRequest; }; /* - * Command TriggerEffect + * Command OverloadPause */ -class IdentifyTriggerEffect : public ClusterCommand +class ApplianceControlOverloadPause : public ClusterCommand { public: - IdentifyTriggerEffect(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("trigger-effect", credsIssuerConfig) + ApplianceControlOverloadPause(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("overload-pause", credsIssuerConfig) { - AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); - AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000003, 0x00000040, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000003, 0x00000040, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000004, mRequest); } private: - chip::app::Clusters::Identify::Commands::TriggerEffect::Type mRequest; + chip::app::Clusters::ApplianceControl::Commands::OverloadPause::Type mRequest; }; -class WriteIdentifyIdentifyTime : public WriteAttribute +/* + * Command OverloadWarning + */ +class ApplianceControlOverloadWarning : public ClusterCommand { public: - WriteIdentifyIdentifyTime(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("IdentifyTime", credsIssuerConfig) + ApplianceControlOverloadWarning(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("overload-warning", credsIssuerConfig) { - AddArgument("attr-name", "identify-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("WarningEvent", 0, UINT8_MAX, &mRequest.warningEvent); + ClusterCommand::AddArguments(); } - ~WriteIdentifyIdentifyTime() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000003, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000005) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000003, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000005) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000005, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::ApplianceControl::Commands::OverloadWarning::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster Groups | 0x0004 | +| Cluster PulseWidthModulation | 0x001C | |------------------------------------------------------------------------------| | Commands: | | -| * AddGroup | 0x00 | -| * ViewGroup | 0x01 | -| * GetGroupMembership | 0x02 | -| * RemoveGroup | 0x03 | -| * RemoveAllGroups | 0x04 | -| * AddGroupIfIdentifying | 0x05 | |------------------------------------------------------------------------------| | Attributes: | | -| * NameSupport | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -1750,212 +2169,233 @@ class WriteIdentifyIdentifyTime : public WriteAttribute | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command AddGroup - */ -class GroupsAddGroup : public ClusterCommand -{ -public: - GroupsAddGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-group", credsIssuerConfig) - { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("GroupName", &mRequest.groupName); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on Group %u", groupId); +/*----------------------------------------------------------------------------*\ +| Cluster Descriptor | 0x001D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DeviceList | 0x0000 | +| * ServerList | 0x0001 | +| * ClientList | 0x0002 | +| * PartsList | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000000, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster Binding | 0x001E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Binding | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::Groups::Commands::AddGroup::Type mRequest; -}; - -/* - * Command ViewGroup - */ -class GroupsViewGroup : public ClusterCommand -{ -public: - GroupsViewGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-group", credsIssuerConfig) - { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000001, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster AccessControl | 0x001F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Acl | 0x0000 | +| * Extension | 0x0001 | +| * SubjectsPerAccessControlEntry | 0x0002 | +| * TargetsPerAccessControlEntry | 0x0003 | +| * AccessControlEntriesPerFabric | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * AccessControlEntryChanged | 0x0000 | +| * AccessControlExtensionChanged | 0x0001 | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::Groups::Commands::ViewGroup::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster PollControl | 0x0020 | +|------------------------------------------------------------------------------| +| Commands: | | +| * CheckInResponse | 0x00 | +| * FastPollStop | 0x01 | +| * SetLongPollInterval | 0x02 | +| * SetShortPollInterval | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CheckInInterval | 0x0000 | +| * LongPollInterval | 0x0001 | +| * ShortPollInterval | 0x0002 | +| * FastPollTimeout | 0x0003 | +| * CheckInIntervalMin | 0x0004 | +| * LongPollIntervalMin | 0x0005 | +| * FastPollTimeoutMax | 0x0006 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Command GetGroupMembership + * Command CheckInResponse */ -class GroupsGetGroupMembership : public ClusterCommand +class PollControlCheckInResponse : public ClusterCommand { public: - GroupsGetGroupMembership(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-group-membership", credsIssuerConfig), mComplex_GroupList(&mRequest.groupList) + PollControlCheckInResponse(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("check-in-response", credsIssuerConfig) { - AddArgument("GroupList", &mComplex_GroupList); + AddArgument("StartFastPolling", 0, 1, &mRequest.startFastPolling); + AddArgument("FastPollTimeout", 0, UINT16_MAX, &mRequest.fastPollTimeout); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000000, mRequest); } private: - chip::app::Clusters::Groups::Commands::GetGroupMembership::Type mRequest; - TypedComplexArgument> mComplex_GroupList; + chip::app::Clusters::PollControl::Commands::CheckInResponse::Type mRequest; }; /* - * Command RemoveGroup + * Command FastPollStop */ -class GroupsRemoveGroup : public ClusterCommand +class PollControlFastPollStop : public ClusterCommand { public: - GroupsRemoveGroup(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-group", credsIssuerConfig) + PollControlFastPollStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fast-poll-stop", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000001, mRequest); } private: - chip::app::Clusters::Groups::Commands::RemoveGroup::Type mRequest; + chip::app::Clusters::PollControl::Commands::FastPollStop::Type mRequest; }; /* - * Command RemoveAllGroups + * Command SetLongPollInterval */ -class GroupsRemoveAllGroups : public ClusterCommand +class PollControlSetLongPollInterval : public ClusterCommand { public: - GroupsRemoveAllGroups(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-all-groups", credsIssuerConfig) + PollControlSetLongPollInterval(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-long-poll-interval", credsIssuerConfig) { + AddArgument("NewLongPollInterval", 0, UINT32_MAX, &mRequest.newLongPollInterval); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000002, mRequest); } private: - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type mRequest; + chip::app::Clusters::PollControl::Commands::SetLongPollInterval::Type mRequest; }; /* - * Command AddGroupIfIdentifying + * Command SetShortPollInterval */ -class GroupsAddGroupIfIdentifying : public ClusterCommand +class PollControlSetShortPollInterval : public ClusterCommand { public: - GroupsAddGroupIfIdentifying(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-group-if-identifying", credsIssuerConfig) + PollControlSetShortPollInterval(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-short-poll-interval", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("GroupName", &mRequest.groupName); + AddArgument("NewShortPollInterval", 0, UINT16_MAX, &mRequest.newShortPollInterval); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000004, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000004, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000003, mRequest); } private: - chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Type mRequest; + chip::app::Clusters::PollControl::Commands::SetShortPollInterval::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster Scenes | 0x0005 | +| Cluster BridgedActions | 0x0025 | |------------------------------------------------------------------------------| | Commands: | | -| * AddScene | 0x00 | -| * ViewScene | 0x01 | -| * RemoveScene | 0x02 | -| * RemoveAllScenes | 0x03 | -| * StoreScene | 0x04 | -| * RecallScene | 0x05 | -| * GetSceneMembership | 0x06 | -| * EnhancedAddScene | 0x40 | -| * EnhancedViewScene | 0x41 | -| * CopyScene | 0x42 | +| * InstantAction | 0x00 | +| * InstantActionWithTransition | 0x01 | +| * StartAction | 0x02 | +| * StartActionWithDuration | 0x03 | +| * StopAction | 0x04 | +| * PauseAction | 0x05 | +| * PauseActionWithDuration | 0x06 | +| * ResumeAction | 0x07 | +| * EnableAction | 0x08 | +| * EnableActionWithDuration | 0x09 | +| * DisableAction | 0x0A | +| * DisableActionWithDuration | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * SceneCount | 0x0000 | -| * CurrentScene | 0x0001 | -| * CurrentGroup | 0x0002 | -| * SceneValid | 0x0003 | -| * NameSupport | 0x0004 | -| * LastConfiguredBy | 0x0005 | +| * ActionList | 0x0000 | +| * EndpointList | 0x0001 | +| * SetupUrl | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -1963,625 +2403,594 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * StateChanged | 0x0000 | +| * ActionFailed | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command AddScene + * Command InstantAction */ -class ScenesAddScene : public ClusterCommand +class BridgedActionsInstantAction : public ClusterCommand { public: - ScenesAddScene(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) + BridgedActionsInstantAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("instant-action", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("SceneName", &mRequest.sceneName); - AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000000, mRequest); } private: - chip::app::Clusters::Scenes::Commands::AddScene::Type mRequest; - TypedComplexArgument> - mComplex_ExtensionFieldSets; + chip::app::Clusters::BridgedActions::Commands::InstantAction::Type mRequest; }; /* - * Command ViewScene + * Command InstantActionWithTransition */ -class ScenesViewScene : public ClusterCommand +class BridgedActionsInstantActionWithTransition : public ClusterCommand { public: - ScenesViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-scene", credsIssuerConfig) + BridgedActionsInstantActionWithTransition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("instant-action-with-transition", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000001, mRequest); } private: - chip::app::Clusters::Scenes::Commands::ViewScene::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type mRequest; }; /* - * Command RemoveScene + * Command StartAction */ -class ScenesRemoveScene : public ClusterCommand +class BridgedActionsStartAction : public ClusterCommand { public: - ScenesRemoveScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-scene", credsIssuerConfig) + BridgedActionsStartAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-action", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000002, mRequest); } private: - chip::app::Clusters::Scenes::Commands::RemoveScene::Type mRequest; -}; - -/* - * Command RemoveAllScenes - */ -class ScenesRemoveAllScenes : public ClusterCommand -{ -public: - ScenesRemoveAllScenes(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-all-scenes", credsIssuerConfig) - { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::StartAction::Type mRequest; }; /* - * Command StoreScene + * Command StartActionWithDuration */ -class ScenesStoreScene : public ClusterCommand +class BridgedActionsStartActionWithDuration : public ClusterCommand { public: - ScenesStoreScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("store-scene", credsIssuerConfig) + BridgedActionsStartActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("start-action-with-duration", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000003, mRequest); } private: - chip::app::Clusters::Scenes::Commands::StoreScene::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type mRequest; }; /* - * Command RecallScene + * Command StopAction */ -class ScenesRecallScene : public ClusterCommand +class BridgedActionsStopAction : public ClusterCommand { public: - ScenesRecallScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("recall-scene", credsIssuerConfig) + BridgedActionsStopAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-action", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000004, mRequest); } private: - chip::app::Clusters::Scenes::Commands::RecallScene::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::StopAction::Type mRequest; }; /* - * Command GetSceneMembership + * Command PauseAction */ -class ScenesGetSceneMembership : public ClusterCommand +class BridgedActionsPauseAction : public ClusterCommand { public: - ScenesGetSceneMembership(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-scene-membership", credsIssuerConfig) + BridgedActionsPauseAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause-action", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000006, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000006, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000005, mRequest); } private: - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::PauseAction::Type mRequest; }; /* - * Command EnhancedAddScene + * Command PauseActionWithDuration */ -class ScenesEnhancedAddScene : public ClusterCommand +class BridgedActionsPauseActionWithDuration : public ClusterCommand { public: - ScenesEnhancedAddScene(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) + BridgedActionsPauseActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("pause-action-with-duration", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("SceneName", &mRequest.sceneName); - AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000040, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000040) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000040, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000006, mRequest); } private: - chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type mRequest; - TypedComplexArgument> - mComplex_ExtensionFieldSets; + chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type mRequest; }; /* - * Command EnhancedViewScene + * Command ResumeAction */ -class ScenesEnhancedViewScene : public ClusterCommand +class BridgedActionsResumeAction : public ClusterCommand { public: - ScenesEnhancedViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enhanced-view-scene", credsIssuerConfig) + BridgedActionsResumeAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume-action", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000041, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000041) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000041, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000007, mRequest); } private: - chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::ResumeAction::Type mRequest; }; /* - * Command CopyScene + * Command EnableAction */ -class ScenesCopyScene : public ClusterCommand +class BridgedActionsEnableAction : public ClusterCommand { public: - ScenesCopyScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("copy-scene", credsIssuerConfig) + BridgedActionsEnableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enable-action", credsIssuerConfig) { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("GroupIdFrom", 0, UINT16_MAX, &mRequest.groupIdFrom); - AddArgument("SceneIdFrom", 0, UINT8_MAX, &mRequest.sceneIdFrom); - AddArgument("GroupIdTo", 0, UINT16_MAX, &mRequest.groupIdTo); - AddArgument("SceneIdTo", 0, UINT8_MAX, &mRequest.sceneIdTo); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000005, 0x00000042, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000042) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000005, 0x00000042, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000008, mRequest); } private: - chip::app::Clusters::Scenes::Commands::CopyScene::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::EnableAction::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster OnOff | 0x0006 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Off | 0x00 | -| * On | 0x01 | -| * Toggle | 0x02 | -| * OffWithEffect | 0x40 | -| * OnWithRecallGlobalScene | 0x41 | -| * OnWithTimedOff | 0x42 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * OnOff | 0x0000 | -| * GlobalSceneControl | 0x4000 | -| * OnTime | 0x4001 | -| * OffWaitTime | 0x4002 | -| * StartUpOnOff | 0x4003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command Off + * Command EnableActionWithDuration */ -class OnOffOff : public ClusterCommand +class BridgedActionsEnableActionWithDuration : public ClusterCommand { public: - OnOffOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off", credsIssuerConfig) + BridgedActionsEnableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enable-action-with-duration", credsIssuerConfig) { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000009, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000009, mRequest); } private: - chip::app::Clusters::OnOff::Commands::Off::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type mRequest; }; /* - * Command On + * Command DisableAction */ -class OnOffOn : public ClusterCommand +class BridgedActionsDisableAction : public ClusterCommand { public: - OnOffOn(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on", credsIssuerConfig) + BridgedActionsDisableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("disable-action", credsIssuerConfig) { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x0000000A, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x0000000A, mRequest); } private: - chip::app::Clusters::OnOff::Commands::On::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::DisableAction::Type mRequest; }; /* - * Command Toggle + * Command DisableActionWithDuration */ -class OnOffToggle : public ClusterCommand +class BridgedActionsDisableActionWithDuration : public ClusterCommand { public: - OnOffToggle(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("toggle", credsIssuerConfig) + BridgedActionsDisableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("disable-action-with-duration", credsIssuerConfig) { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x0000000B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x0000000B, mRequest); } private: - chip::app::Clusters::OnOff::Commands::Toggle::Type mRequest; + chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type mRequest; }; -/* - * Command OffWithEffect - */ -class OnOffOffWithEffect : public ClusterCommand -{ -public: - OnOffOffWithEffect(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off-with-effect", credsIssuerConfig) +/*----------------------------------------------------------------------------*\ +| Cluster Basic | 0x0028 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MfgSpecificPing | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DataModelRevision | 0x0000 | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * ProductID | 0x0004 | +| * NodeLabel | 0x0005 | +| * Location | 0x0006 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * LocalConfigDisabled | 0x0010 | +| * Reachable | 0x0011 | +| * UniqueID | 0x0012 | +| * CapabilityMinima | 0x0013 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | +\*----------------------------------------------------------------------------*/ + +/* + * Command MfgSpecificPing + */ +class BasicMfgSpecificPing : public ClusterCommand +{ +public: + BasicMfgSpecificPing(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("mfg-specific-ping", credsIssuerConfig) { - AddArgument("EffectId", 0, UINT8_MAX, &mRequest.effectId); - AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000040, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000028, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000040, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000028, 0x00000000, mRequest); } private: - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type mRequest; + chip::app::Clusters::Basic::Commands::MfgSpecificPing::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster OtaSoftwareUpdateProvider | 0x0029 | +|------------------------------------------------------------------------------| +| Commands: | | +| * QueryImage | 0x00 | +| * ApplyUpdateRequest | 0x02 | +| * NotifyUpdateApplied | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command OnWithRecallGlobalScene + * Command QueryImage */ -class OnOffOnWithRecallGlobalScene : public ClusterCommand +class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { public: - OnOffOnWithRecallGlobalScene(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("on-with-recall-global-scene", credsIssuerConfig) + OtaSoftwareUpdateProviderQueryImage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("query-image", credsIssuerConfig), mComplex_ProtocolsSupported(&mRequest.protocolsSupported) { + AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); + AddArgument("ProductId", 0, UINT16_MAX, &mRequest.productId); + AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); + AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); + AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); + AddArgument("Location", &mRequest.location); + AddArgument("RequestorCanConsent", 0, 1, &mRequest.requestorCanConsent); + AddArgument("MetadataForProvider", &mRequest.metadataForProvider); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000041, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000041, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000000, mRequest); } private: - chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; + TypedComplexArgument> + mComplex_ProtocolsSupported; }; /* - * Command OnWithTimedOff + * Command ApplyUpdateRequest */ -class OnOffOnWithTimedOff : public ClusterCommand +class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { public: - OnOffOnWithTimedOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on-with-timed-off", credsIssuerConfig) + OtaSoftwareUpdateProviderApplyUpdateRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("apply-update-request", credsIssuerConfig) { - AddArgument("OnOffControl", 0, UINT8_MAX, &mRequest.onOffControl); - AddArgument("OnTime", 0, UINT16_MAX, &mRequest.onTime); - AddArgument("OffWaitTime", 0, UINT16_MAX, &mRequest.offWaitTime); + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00000042, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00000042, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000002, mRequest); } private: - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; }; -class WriteOnOffOnTime : public WriteAttribute +/* + * Command NotifyUpdateApplied + */ +class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { public: - WriteOnOffOnTime(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("OnTime", credsIssuerConfig) + OtaSoftwareUpdateProviderNotifyUpdateApplied(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("notify-update-applied", credsIssuerConfig) { - AddArgument("attr-name", "on-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); + ClusterCommand::AddArguments(); } - ~WriteOnOffOnTime() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00004001, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00004001, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOnOffOffWaitTime : public WriteAttribute -{ -public: - WriteOnOffOffWaitTime(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("OffWaitTime", credsIssuerConfig) - { - AddArgument("attr-name", "off-wait-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOnOffOffWaitTime() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00004002, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00004002, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOnOffStartUpOnOff : public WriteAttribute -{ -public: - WriteOnOffStartUpOnOff(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("StartUpOnOff", credsIssuerConfig) - { - AddArgument("attr-name", "start-up-on-off"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOnOffStartUpOnOff() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000006, 0x00004003, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000006, 0x00004003, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000004, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OnOffSwitchConfiguration | 0x0007 | +| Cluster OtaSoftwareUpdateRequestor | 0x002A | |------------------------------------------------------------------------------| | Commands: | | +| * AnnounceOtaProvider | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SwitchType | 0x0000 | -| * SwitchActions | 0x0010 | +| * DefaultOtaProviders | 0x0000 | +| * UpdatePossible | 0x0001 | +| * UpdateState | 0x0002 | +| * UpdateStateProgress | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -2589,64 +2998,54 @@ class WriteOnOffStartUpOnOff : public WriteAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * StateTransition | 0x0000 | +| * VersionApplied | 0x0001 | +| * DownloadError | 0x0002 | \*----------------------------------------------------------------------------*/ -class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute +/* + * Command AnnounceOtaProvider + */ +class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { public: - WriteOnOffSwitchConfigurationSwitchActions(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("SwitchActions", credsIssuerConfig) + OtaSoftwareUpdateRequestorAnnounceOtaProvider(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("announce-ota-provider", credsIssuerConfig) { - AddArgument("attr-name", "switch-actions"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("ProviderNodeId", 0, UINT64_MAX, &mRequest.providerNodeId); + AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); + AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); + AddArgument("MetadataForNode", &mRequest.metadataForNode); + AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); + ClusterCommand::AddArguments(); } - ~WriteOnOffSwitchConfigurationSwitchActions() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000007, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000002A, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000007, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000002A, 0x00000000, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster LevelControl | 0x0008 | +| Cluster LocalizationConfiguration | 0x002B | |------------------------------------------------------------------------------| | Commands: | | -| * MoveToLevel | 0x00 | -| * Move | 0x01 | -| * Step | 0x02 | -| * Stop | 0x03 | -| * MoveToLevelWithOnOff | 0x04 | -| * MoveWithOnOff | 0x05 | -| * StepWithOnOff | 0x06 | -| * StopWithOnOff | 0x07 | -| * MoveToClosestFrequency | 0x08 | |------------------------------------------------------------------------------| | Attributes: | | -| * CurrentLevel | 0x0000 | -| * RemainingTime | 0x0001 | -| * MinLevel | 0x0002 | -| * MaxLevel | 0x0003 | -| * CurrentFrequency | 0x0004 | -| * MinFrequency | 0x0005 | -| * MaxFrequency | 0x0006 | -| * Options | 0x000F | -| * OnOffTransitionTime | 0x0010 | -| * OnLevel | 0x0011 | -| * OnTransitionTime | 0x0012 | -| * OffTransitionTime | 0x0013 | -| * DefaultMoveRate | 0x0014 | -| * StartUpCurrentLevel | 0x4000 | +| * ActiveLocale | 0x0000 | +| * SupportedLocales | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -2656,490 +3055,564 @@ class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command MoveToLevel - */ -class LevelControlMoveToLevel : public ClusterCommand -{ -public: - LevelControlMoveToLevel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-level", credsIssuerConfig) - { - AddArgument("Level", 0, UINT8_MAX, &mRequest.level); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on Group %u", groupId); +/*----------------------------------------------------------------------------*\ +| Cluster TimeFormatLocalization | 0x002C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * HourFormat | 0x0000 | +| * ActiveCalendarType | 0x0001 | +| * SupportedCalendarTypes | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000000, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster UnitLocalization | 0x002D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureUnit | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster PowerSourceConfiguration | 0x002E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Sources | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster PowerSource | 0x002F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Status | 0x0000 | +| * Order | 0x0001 | +| * Description | 0x0002 | +| * WiredAssessedInputVoltage | 0x0003 | +| * WiredAssessedInputFrequency | 0x0004 | +| * WiredCurrentType | 0x0005 | +| * WiredAssessedCurrent | 0x0006 | +| * WiredNominalVoltage | 0x0007 | +| * WiredMaximumCurrent | 0x0008 | +| * WiredPresent | 0x0009 | +| * ActiveWiredFaults | 0x000A | +| * BatteryVoltage | 0x000B | +| * BatteryPercentRemaining | 0x000C | +| * BatteryTimeRemaining | 0x000D | +| * BatteryChargeLevel | 0x000E | +| * BatteryReplacementNeeded | 0x000F | +| * BatteryReplaceability | 0x0010 | +| * BatteryPresent | 0x0011 | +| * ActiveBatteryFaults | 0x0012 | +| * BatteryReplacementDescription | 0x0013 | +| * BatteryCommonDesignation | 0x0014 | +| * BatteryANSIDesignation | 0x0015 | +| * BatteryIECDesignation | 0x0016 | +| * BatteryApprovedChemistry | 0x0017 | +| * BatteryCapacity | 0x0018 | +| * BatteryQuantity | 0x0019 | +| * BatteryChargeState | 0x001A | +| * BatteryTimeToFullCharge | 0x001B | +| * BatteryFunctionalWhileCharging | 0x001C | +| * BatteryChargingCurrent | 0x001D | +| * ActiveBatteryChargeFaults | 0x001E | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster GeneralCommissioning | 0x0030 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ArmFailSafe | 0x00 | +| * SetRegulatoryConfig | 0x02 | +| * CommissioningComplete | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Breadcrumb | 0x0000 | +| * BasicCommissioningInfo | 0x0001 | +| * RegulatoryConfig | 0x0002 | +| * LocationCapability | 0x0003 | +| * SupportsConcurrentConnection | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Command Move + * Command ArmFailSafe */ -class LevelControlMove : public ClusterCommand +class GeneralCommissioningArmFailSafe : public ClusterCommand { public: - LevelControlMove(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move", credsIssuerConfig) + GeneralCommissioningArmFailSafe(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("arm-fail-safe", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000000, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::Move::Type mRequest; + chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; }; /* - * Command Step + * Command SetRegulatoryConfig */ -class LevelControlStep : public ClusterCommand +class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { public: - LevelControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) + GeneralCommissioningSetRegulatoryConfig(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-regulatory-config", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); + AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); + AddArgument("CountryCode", &mRequest.countryCode); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000002, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::Step::Type mRequest; + chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; }; /* - * Command Stop + * Command CommissioningComplete */ -class LevelControlStop : public ClusterCommand +class GeneralCommissioningCommissioningComplete : public ClusterCommand { public: - LevelControlStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + GeneralCommissioningCommissioningComplete(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("commissioning-complete", credsIssuerConfig) { - AddArgument("OptionMask", 0, UINT8_MAX, &mRequest.optionMask); - AddArgument("OptionOverride", 0, UINT8_MAX, &mRequest.optionOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000004, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::Stop::Type mRequest; + chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster NetworkCommissioning | 0x0031 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ScanNetworks | 0x00 | +| * AddOrUpdateWiFiNetwork | 0x02 | +| * AddOrUpdateThreadNetwork | 0x03 | +| * RemoveNetwork | 0x04 | +| * ConnectNetwork | 0x06 | +| * ReorderNetwork | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MaxNetworks | 0x0000 | +| * Networks | 0x0001 | +| * ScanMaxTimeSeconds | 0x0002 | +| * ConnectMaxTimeSeconds | 0x0003 | +| * InterfaceEnabled | 0x0004 | +| * LastNetworkingStatus | 0x0005 | +| * LastNetworkID | 0x0006 | +| * LastConnectErrorValue | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command MoveToLevelWithOnOff + * Command ScanNetworks */ -class LevelControlMoveToLevelWithOnOff : public ClusterCommand +class NetworkCommissioningScanNetworks : public ClusterCommand { public: - LevelControlMoveToLevelWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-level-with-on-off", credsIssuerConfig) + NetworkCommissioningScanNetworks(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("scan-networks", credsIssuerConfig) { - AddArgument("Level", 0, UINT8_MAX, &mRequest.level); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("Ssid", &mRequest.ssid); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000000, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; }; /* - * Command MoveWithOnOff + * Command AddOrUpdateWiFiNetwork */ -class LevelControlMoveWithOnOff : public ClusterCommand +class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { public: - LevelControlMoveWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-with-on-off", credsIssuerConfig) + NetworkCommissioningAddOrUpdateWiFiNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-or-update-wi-fi-network", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("Ssid", &mRequest.ssid); + AddArgument("Credentials", &mRequest.credentials); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000002, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; }; /* - * Command StepWithOnOff + * Command AddOrUpdateThreadNetwork */ -class LevelControlStepWithOnOff : public ClusterCommand +class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { public: - LevelControlStepWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-with-on-off", credsIssuerConfig) + NetworkCommissioningAddOrUpdateThreadNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-or-update-thread-network", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OperationalDataset", &mRequest.operationalDataset); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000006, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000006, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000003, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; }; /* - * Command StopWithOnOff + * Command RemoveNetwork */ -class LevelControlStopWithOnOff : public ClusterCommand +class NetworkCommissioningRemoveNetwork : public ClusterCommand { public: - LevelControlStopWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-with-on-off", credsIssuerConfig) + NetworkCommissioningRemoveNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-network", credsIssuerConfig) { + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000007, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000004, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type mRequest; }; /* - * Command MoveToClosestFrequency + * Command ConnectNetwork */ -class LevelControlMoveToClosestFrequency : public ClusterCommand +class NetworkCommissioningConnectNetwork : public ClusterCommand { public: - LevelControlMoveToClosestFrequency(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-closest-frequency", credsIssuerConfig) + NetworkCommissioningConnectNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("connect-network", credsIssuerConfig) { - AddArgument("Frequency", 0, UINT16_MAX, &mRequest.frequency); + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000008, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000008) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000006, mRequest); } private: - chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type mRequest; }; -class WriteLevelControlOptions : public WriteAttribute +/* + * Command ReorderNetwork + */ +class NetworkCommissioningReorderNetwork : public ClusterCommand { public: - WriteLevelControlOptions(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Options", credsIssuerConfig) + NetworkCommissioningReorderNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reorder-network", credsIssuerConfig) { - AddArgument("attr-name", "options"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("NetworkIndex", 0, UINT8_MAX, &mRequest.networkIndex); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } - ~WriteLevelControlOptions() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000008, 0x0000000F, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x0000000F, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteLevelControlOnOffTransitionTime : public WriteAttribute -{ -public: - WriteLevelControlOnOffTransitionTime(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OnOffTransitionTime", credsIssuerConfig) - { - AddArgument("attr-name", "on-off-transition-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLevelControlOnOffTransitionTime() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000010, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000010, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteLevelControlOnLevel : public WriteAttribute -{ -public: - WriteLevelControlOnLevel(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("OnLevel", credsIssuerConfig) - { - AddArgument("attr-name", "on-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLevelControlOnLevel() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000011, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000011, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000008, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; }; -class WriteLevelControlOnTransitionTime : public WriteAttribute -{ -public: - WriteLevelControlOnTransitionTime(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OnTransitionTime", credsIssuerConfig) - { - AddArgument("attr-name", "on-transition-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLevelControlOnTransitionTime() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000012, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000012, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster DiagnosticLogs | 0x0032 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RetrieveLogsRequest | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteLevelControlOffTransitionTime : public WriteAttribute +/* + * Command RetrieveLogsRequest + */ +class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { public: - WriteLevelControlOffTransitionTime(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OffTransitionTime", credsIssuerConfig) + DiagnosticLogsRetrieveLogsRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("retrieve-logs-request", credsIssuerConfig) { - AddArgument("attr-name", "off-transition-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Intent", 0, UINT8_MAX, &mRequest.intent); + AddArgument("RequestedProtocol", 0, UINT8_MAX, &mRequest.requestedProtocol); + AddArgument("TransferFileDesignator", &mRequest.transferFileDesignator); + ClusterCommand::AddArguments(); } - ~WriteLevelControlOffTransitionTime() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000013, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000013, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteLevelControlDefaultMoveRate : public WriteAttribute -{ -public: - WriteLevelControlDefaultMoveRate(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("DefaultMoveRate", credsIssuerConfig) - { - AddArgument("attr-name", "default-move-rate"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLevelControlDefaultMoveRate() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00000014, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000032, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00000014, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000032, 0x00000000, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type mRequest; }; -class WriteLevelControlStartUpCurrentLevel : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster GeneralDiagnostics | 0x0033 | +|------------------------------------------------------------------------------| +| Commands: | | +| * TestEventTrigger | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NetworkInterfaces | 0x0000 | +| * RebootCount | 0x0001 | +| * UpTime | 0x0002 | +| * TotalOperationalHours | 0x0003 | +| * BootReasons | 0x0004 | +| * ActiveHardwareFaults | 0x0005 | +| * ActiveRadioFaults | 0x0006 | +| * ActiveNetworkFaults | 0x0007 | +| * TestEventTriggersEnabled | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * HardwareFaultChange | 0x0000 | +| * RadioFaultChange | 0x0001 | +| * NetworkFaultChange | 0x0002 | +| * BootReason | 0x0003 | +\*----------------------------------------------------------------------------*/ + +/* + * Command TestEventTrigger + */ +class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { public: - WriteLevelControlStartUpCurrentLevel(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("StartUpCurrentLevel", credsIssuerConfig) + GeneralDiagnosticsTestEventTrigger(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-event-trigger", credsIssuerConfig) { - AddArgument("attr-name", "start-up-current-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("EnableKey", &mRequest.enableKey); + AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); + ClusterCommand::AddArguments(); } - ~WriteLevelControlStartUpCurrentLevel() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000008, 0x00004000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000033, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000008, 0x00004000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000033, 0x00000000, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster Alarms | 0x0009 | +| Cluster SoftwareDiagnostics | 0x0034 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetAlarm | 0x00 | -| * ResetAllAlarms | 0x01 | -| * GetAlarm | 0x02 | -| * ResetAlarmLog | 0x03 | +| * ResetWatermarks | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * AlarmCount | 0x0000 | +| * ThreadMetrics | 0x0000 | +| * CurrentHeapFree | 0x0001 | +| * CurrentHeapUsed | 0x0002 | +| * CurrentHeapHighWatermark | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -3147,142 +3620,272 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * SoftwareFault | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command ResetAlarm + * Command ResetWatermarks */ -class AlarmsResetAlarm : public ClusterCommand +class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { public: - AlarmsResetAlarm(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-alarm", credsIssuerConfig) + SoftwareDiagnosticsResetWatermarks(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-watermarks", credsIssuerConfig) { - AddArgument("AlarmCode", 0, UINT8_MAX, &mRequest.alarmCode); - AddArgument("ClusterId", 0, UINT32_MAX, &mRequest.clusterId); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000034, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000034, 0x00000000, mRequest); } private: - chip::app::Clusters::Alarms::Commands::ResetAlarm::Type mRequest; + chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster ThreadNetworkDiagnostics | 0x0035 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Channel | 0x0000 | +| * RoutingRole | 0x0001 | +| * NetworkName | 0x0002 | +| * PanId | 0x0003 | +| * ExtendedPanId | 0x0004 | +| * MeshLocalPrefix | 0x0005 | +| * OverrunCount | 0x0006 | +| * NeighborTableList | 0x0007 | +| * RouteTableList | 0x0008 | +| * PartitionId | 0x0009 | +| * Weighting | 0x000A | +| * DataVersion | 0x000B | +| * StableDataVersion | 0x000C | +| * LeaderRouterId | 0x000D | +| * DetachedRoleCount | 0x000E | +| * ChildRoleCount | 0x000F | +| * RouterRoleCount | 0x0010 | +| * LeaderRoleCount | 0x0011 | +| * AttachAttemptCount | 0x0012 | +| * PartitionIdChangeCount | 0x0013 | +| * BetterPartitionAttachAttemptCount | 0x0014 | +| * ParentChangeCount | 0x0015 | +| * TxTotalCount | 0x0016 | +| * TxUnicastCount | 0x0017 | +| * TxBroadcastCount | 0x0018 | +| * TxAckRequestedCount | 0x0019 | +| * TxAckedCount | 0x001A | +| * TxNoAckRequestedCount | 0x001B | +| * TxDataCount | 0x001C | +| * TxDataPollCount | 0x001D | +| * TxBeaconCount | 0x001E | +| * TxBeaconRequestCount | 0x001F | +| * TxOtherCount | 0x0020 | +| * TxRetryCount | 0x0021 | +| * TxDirectMaxRetryExpiryCount | 0x0022 | +| * TxIndirectMaxRetryExpiryCount | 0x0023 | +| * TxErrCcaCount | 0x0024 | +| * TxErrAbortCount | 0x0025 | +| * TxErrBusyChannelCount | 0x0026 | +| * RxTotalCount | 0x0027 | +| * RxUnicastCount | 0x0028 | +| * RxBroadcastCount | 0x0029 | +| * RxDataCount | 0x002A | +| * RxDataPollCount | 0x002B | +| * RxBeaconCount | 0x002C | +| * RxBeaconRequestCount | 0x002D | +| * RxOtherCount | 0x002E | +| * RxAddressFilteredCount | 0x002F | +| * RxDestAddrFilteredCount | 0x0030 | +| * RxDuplicatedCount | 0x0031 | +| * RxErrNoFrameCount | 0x0032 | +| * RxErrUnknownNeighborCount | 0x0033 | +| * RxErrInvalidSrcAddrCount | 0x0034 | +| * RxErrSecCount | 0x0035 | +| * RxErrFcsCount | 0x0036 | +| * RxErrOtherCount | 0x0037 | +| * ActiveTimestamp | 0x0038 | +| * PendingTimestamp | 0x0039 | +| * Delay | 0x003A | +| * SecurityPolicy | 0x003B | +| * ChannelMask | 0x003C | +| * OperationalDatasetComponents | 0x003D | +| * ActiveNetworkFaultsList | 0x003E | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * ConnectionStatus | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Command ResetAllAlarms + * Command ResetCounts */ -class AlarmsResetAllAlarms : public ClusterCommand +class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { public: - AlarmsResetAllAlarms(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-all-alarms", credsIssuerConfig) + ThreadNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-counts", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000035, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000035, 0x00000000, mRequest); } private: - chip::app::Clusters::Alarms::Commands::ResetAllAlarms::Type mRequest; + chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster WiFiNetworkDiagnostics | 0x0036 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Bssid | 0x0000 | +| * SecurityType | 0x0001 | +| * WiFiVersion | 0x0002 | +| * ChannelNumber | 0x0003 | +| * Rssi | 0x0004 | +| * BeaconLostCount | 0x0005 | +| * BeaconRxCount | 0x0006 | +| * PacketMulticastRxCount | 0x0007 | +| * PacketMulticastTxCount | 0x0008 | +| * PacketUnicastRxCount | 0x0009 | +| * PacketUnicastTxCount | 0x000A | +| * CurrentMaxRate | 0x000B | +| * OverrunCount | 0x000C | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Disconnection | 0x0000 | +| * AssociationFailure | 0x0001 | +| * ConnectionStatus | 0x0002 | +\*----------------------------------------------------------------------------*/ + /* - * Command GetAlarm + * Command ResetCounts */ -class AlarmsGetAlarm : public ClusterCommand +class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { public: - AlarmsGetAlarm(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-alarm", credsIssuerConfig) + WiFiNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-counts", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000036, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000036, 0x00000000, mRequest); } private: - chip::app::Clusters::Alarms::Commands::GetAlarm::Type mRequest; + chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster EthernetNetworkDiagnostics | 0x0037 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PHYRate | 0x0000 | +| * FullDuplex | 0x0001 | +| * PacketRxCount | 0x0002 | +| * PacketTxCount | 0x0003 | +| * TxErrCount | 0x0004 | +| * CollisionCount | 0x0005 | +| * OverrunCount | 0x0006 | +| * CarrierDetect | 0x0007 | +| * TimeSinceReset | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command ResetAlarmLog + * Command ResetCounts */ -class AlarmsResetAlarmLog : public ClusterCommand +class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { public: - AlarmsResetAlarmLog(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-alarm-log", credsIssuerConfig) + EthernetNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-counts", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000009, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000037, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000009) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000009, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000037, 0x00000000, mRequest); } private: - chip::app::Clusters::Alarms::Commands::ResetAlarmLog::Type mRequest; + chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster Time | 0x000A | +| Cluster TimeSynchronization | 0x0038 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * Time | 0x0000 | -| * TimeStatus | 0x0001 | -| * TimeZone | 0x0002 | -| * DstStart | 0x0003 | -| * DstEnd | 0x0004 | -| * DstShift | 0x0005 | -| * StandardTime | 0x0006 | -| * LocalTime | 0x0007 | -| * LastSetTime | 0x0008 | -| * ValidUntilTime | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -3292,203 +3895,202 @@ class AlarmsResetAlarmLog : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -class WriteTimeTime : public WriteAttribute -{ -public: - WriteTimeTime(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Time", credsIssuerConfig) - { - AddArgument("attr-name", "time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeTime() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000A, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000A, 0x00000000, mValue); - } - -private: - uint32_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster BridgedDeviceBasic | 0x0039 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * NodeLabel | 0x0005 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * Reachable | 0x0011 | +| * UniqueID | 0x0012 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | +\*----------------------------------------------------------------------------*/ -class WriteTimeTimeStatus : public WriteAttribute -{ -public: - WriteTimeTimeStatus(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("TimeStatus", credsIssuerConfig) - { - AddArgument("attr-name", "time-status"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeTimeStatus() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000A, 0x00000001, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000A, 0x00000001, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster Switch | 0x003B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NumberOfPositions | 0x0000 | +| * CurrentPosition | 0x0001 | +| * MultiPressMax | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SwitchLatched | 0x0000 | +| * InitialPress | 0x0001 | +| * LongPress | 0x0002 | +| * ShortRelease | 0x0003 | +| * LongRelease | 0x0004 | +| * MultiPressOngoing | 0x0005 | +| * MultiPressComplete | 0x0006 | +\*----------------------------------------------------------------------------*/ -private: - uint8_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster AdministratorCommissioning | 0x003C | +|------------------------------------------------------------------------------| +| Commands: | | +| * OpenCommissioningWindow | 0x00 | +| * OpenBasicCommissioningWindow | 0x01 | +| * RevokeCommissioning | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * WindowStatus | 0x0000 | +| * AdminFabricIndex | 0x0001 | +| * AdminVendorId | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteTimeTimeZone : public WriteAttribute +/* + * Command OpenCommissioningWindow + */ +class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { public: - WriteTimeTimeZone(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("TimeZone", credsIssuerConfig) + AdministratorCommissioningOpenCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("open-commissioning-window", credsIssuerConfig) { - AddArgument("attr-name", "time-zone"); - AddArgument("attr-value", INT32_MIN, INT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + AddArgument("PAKEVerifier", &mRequest.PAKEVerifier); + AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); + AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); + AddArgument("Salt", &mRequest.salt); + ClusterCommand::AddArguments(); } - ~WriteTimeTimeZone() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000A, 0x00000002, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000A, 0x00000002, mValue); - } - -private: - int32_t mValue; -}; - -class WriteTimeDstStart : public WriteAttribute -{ -public: - WriteTimeDstStart(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("DstStart", credsIssuerConfig) - { - AddArgument("attr-name", "dst-start"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeDstStart() {} + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000A, 0x00000003, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000A, 0x00000003, mValue); - } - -private: - uint32_t mValue; -}; - -class WriteTimeDstEnd : public WriteAttribute -{ -public: - WriteTimeDstEnd(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("DstEnd", credsIssuerConfig) - { - AddArgument("attr-name", "dst-end"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeDstEnd() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000A, 0x00000004, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000A, 0x00000004, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000000, mRequest); } private: - uint32_t mValue; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; }; -class WriteTimeDstShift : public WriteAttribute +/* + * Command OpenBasicCommissioningWindow + */ +class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand { public: - WriteTimeDstShift(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("DstShift", credsIssuerConfig) + AdministratorCommissioningOpenBasicCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("open-basic-commissioning-window", credsIssuerConfig) { - AddArgument("attr-name", "dst-shift"); - AddArgument("attr-value", INT32_MIN, INT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + ClusterCommand::AddArguments(); } - ~WriteTimeDstShift() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000A, 0x00000005, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000A, 0x00000005, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000001, mRequest); } private: - int32_t mValue; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; }; -class WriteTimeValidUntilTime : public WriteAttribute +/* + * Command RevokeCommissioning + */ +class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { public: - WriteTimeValidUntilTime(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ValidUntilTime", credsIssuerConfig) + AdministratorCommissioningRevokeCommissioning(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("revoke-commissioning", credsIssuerConfig) { - AddArgument("attr-name", "valid-until-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTimeValidUntilTime() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000A, 0x00000009, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000A, 0x00000009, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000002, mRequest); } private: - uint32_t mValue; + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster BinaryInputBasic | 0x000F | +| Cluster OperationalCredentials | 0x003E | |------------------------------------------------------------------------------| | Commands: | | +| * AttestationRequest | 0x00 | +| * CertificateChainRequest | 0x02 | +| * CSRRequest | 0x04 | +| * AddNOC | 0x06 | +| * UpdateNOC | 0x07 | +| * UpdateFabricLabel | 0x09 | +| * RemoveFabric | 0x0A | +| * AddTrustedRootCertificate | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * ActiveText | 0x0004 | -| * Description | 0x001C | -| * InactiveText | 0x002E | -| * OutOfService | 0x0051 | -| * Polarity | 0x0054 | -| * PresentValue | 0x0055 | -| * Reliability | 0x0067 | -| * StatusFlags | 0x006F | -| * ApplicationType | 0x0100 | +| * NOCs | 0x0000 | +| * Fabrics | 0x0001 | +| * SupportedFabrics | 0x0002 | +| * CommissionedFabrics | 0x0003 | +| * TrustedRootCertificates | 0x0004 | +| * CurrentFabricIndex | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -3498,532 +4100,631 @@ class WriteTimeValidUntilTime : public WriteAttribute | Events: | | \*----------------------------------------------------------------------------*/ -class WriteBinaryInputBasicActiveText : public WriteAttribute +/* + * Command AttestationRequest + */ +class OperationalCredentialsAttestationRequest : public ClusterCommand { public: - WriteBinaryInputBasicActiveText(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ActiveText", credsIssuerConfig) + OperationalCredentialsAttestationRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("attestation-request", credsIssuerConfig) { - AddArgument("attr-name", "active-text"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("AttestationNonce", &mRequest.attestationNonce); + ClusterCommand::AddArguments(); } - ~WriteBinaryInputBasicActiveText() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000F, 0x00000004, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000F, 0x00000004, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000000, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; }; -class WriteBinaryInputBasicDescription : public WriteAttribute +/* + * Command CertificateChainRequest + */ +class OperationalCredentialsCertificateChainRequest : public ClusterCommand { public: - WriteBinaryInputBasicDescription(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Description", credsIssuerConfig) + OperationalCredentialsCertificateChainRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("certificate-chain-request", credsIssuerConfig) { - AddArgument("attr-name", "description"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); + ClusterCommand::AddArguments(); } - ~WriteBinaryInputBasicDescription() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000F, 0x0000001C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000F, 0x0000001C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000002, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; }; -class WriteBinaryInputBasicInactiveText : public WriteAttribute +/* + * Command CSRRequest + */ +class OperationalCredentialsCSRRequest : public ClusterCommand { public: - WriteBinaryInputBasicInactiveText(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("InactiveText", credsIssuerConfig) + OperationalCredentialsCSRRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("csrrequest", credsIssuerConfig) { - AddArgument("attr-name", "inactive-text"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("CSRNonce", &mRequest.CSRNonce); + AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); + ClusterCommand::AddArguments(); } - ~WriteBinaryInputBasicInactiveText() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000F, 0x0000002E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000F, 0x0000002E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000004, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; }; -class WriteBinaryInputBasicOutOfService : public WriteAttribute +/* + * Command AddNOC + */ +class OperationalCredentialsAddNOC : public ClusterCommand { public: - WriteBinaryInputBasicOutOfService(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OutOfService", credsIssuerConfig) + OperationalCredentialsAddNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-noc", credsIssuerConfig) { - AddArgument("attr-name", "out-of-service"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + AddArgument("IPKValue", &mRequest.IPKValue); + AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); + AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); + ClusterCommand::AddArguments(); } - ~WriteBinaryInputBasicOutOfService() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000F, 0x00000051, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000F, 0x00000051, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000006, mRequest); } private: - bool mValue; + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; }; -class WriteBinaryInputBasicPresentValue : public WriteAttribute +/* + * Command UpdateNOC + */ +class OperationalCredentialsUpdateNOC : public ClusterCommand { public: - WriteBinaryInputBasicPresentValue(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PresentValue", credsIssuerConfig) + OperationalCredentialsUpdateNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("update-noc", credsIssuerConfig) { - AddArgument("attr-name", "present-value"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + ClusterCommand::AddArguments(); } - ~WriteBinaryInputBasicPresentValue() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000F, 0x00000055, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000F, 0x00000055, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000007, mRequest); } private: - bool mValue; + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; -class WriteBinaryInputBasicReliability : public WriteAttribute +/* + * Command UpdateFabricLabel + */ +class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { public: - WriteBinaryInputBasicReliability(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Reliability", credsIssuerConfig) + OperationalCredentialsUpdateFabricLabel(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("update-fabric-label", credsIssuerConfig) { - AddArgument("attr-name", "reliability"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Label", &mRequest.label); + ClusterCommand::AddArguments(); } - ~WriteBinaryInputBasicReliability() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000000F, 0x00000067, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000009, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000000F, 0x00000067, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000009, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster PowerProfile | 0x001A | -|------------------------------------------------------------------------------| -| Commands: | | -| * PowerProfileRequest | 0x00 | -| * PowerProfileStateRequest | 0x01 | -| * GetPowerProfilePriceResponse | 0x02 | -| * GetOverallSchedulePriceResponse | 0x03 | -| * EnergyPhasesScheduleNotification | 0x04 | -| * EnergyPhasesScheduleResponse | 0x05 | -| * PowerProfileScheduleConstraintsRequest | 0x06 | -| * EnergyPhasesScheduleStateRequest | 0x07 | -| * GetPowerProfilePriceExtendedResponse | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TotalProfileNum | 0x0000 | -| * MultipleScheduling | 0x0001 | -| * EnergyFormatting | 0x0002 | -| * EnergyRemote | 0x0003 | -| * ScheduleMode | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command PowerProfileRequest + * Command RemoveFabric */ -class PowerProfilePowerProfileRequest : public ClusterCommand +class OperationalCredentialsRemoveFabric : public ClusterCommand { public: - PowerProfilePowerProfileRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("power-profile-request", credsIssuerConfig) + OperationalCredentialsRemoveFabric(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-fabric", credsIssuerConfig) { - AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); + AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x0000000A, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x0000000A, mRequest); } private: - chip::app::Clusters::PowerProfile::Commands::PowerProfileRequest::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; }; /* - * Command PowerProfileStateRequest + * Command AddTrustedRootCertificate */ -class PowerProfilePowerProfileStateRequest : public ClusterCommand +class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { public: - PowerProfilePowerProfileStateRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("power-profile-state-request", credsIssuerConfig) + OperationalCredentialsAddTrustedRootCertificate(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-trusted-root-certificate", credsIssuerConfig) { + AddArgument("RootCertificate", &mRequest.rootCertificate); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x0000000B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x0000000B, mRequest); } private: - chip::app::Clusters::PowerProfile::Commands::PowerProfileStateRequest::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster GroupKeyManagement | 0x003F | +|------------------------------------------------------------------------------| +| Commands: | | +| * KeySetWrite | 0x00 | +| * KeySetRead | 0x01 | +| * KeySetRemove | 0x03 | +| * KeySetReadAllIndices | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GroupKeyMap | 0x0000 | +| * GroupTable | 0x0001 | +| * MaxGroupsPerFabric | 0x0002 | +| * MaxGroupKeysPerFabric | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command GetPowerProfilePriceResponse + * Command KeySetWrite */ -class PowerProfileGetPowerProfilePriceResponse : public ClusterCommand +class GroupKeyManagementKeySetWrite : public ClusterCommand { public: - PowerProfileGetPowerProfilePriceResponse(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-power-profile-price-response", credsIssuerConfig) + GroupKeyManagementKeySetWrite(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-write", credsIssuerConfig), mComplex_GroupKeySet(&mRequest.groupKeySet) { - AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); - AddArgument("Currency", 0, UINT16_MAX, &mRequest.currency); - AddArgument("Price", 0, UINT32_MAX, &mRequest.price); - AddArgument("PriceTrailingDigit", 0, UINT8_MAX, &mRequest.priceTrailingDigit); + AddArgument("GroupKeySet", &mComplex_GroupKeySet); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000000, mRequest); } private: - chip::app::Clusters::PowerProfile::Commands::GetPowerProfilePriceResponse::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; + TypedComplexArgument mComplex_GroupKeySet; }; /* - * Command GetOverallSchedulePriceResponse + * Command KeySetRead */ -class PowerProfileGetOverallSchedulePriceResponse : public ClusterCommand +class GroupKeyManagementKeySetRead : public ClusterCommand { public: - PowerProfileGetOverallSchedulePriceResponse(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-overall-schedule-price-response", credsIssuerConfig) + GroupKeyManagementKeySetRead(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("key-set-read", credsIssuerConfig) { - AddArgument("Currency", 0, UINT16_MAX, &mRequest.currency); - AddArgument("Price", 0, UINT32_MAX, &mRequest.price); - AddArgument("PriceTrailingDigit", 0, UINT8_MAX, &mRequest.priceTrailingDigit); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000001, mRequest); } private: - chip::app::Clusters::PowerProfile::Commands::GetOverallSchedulePriceResponse::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Command EnergyPhasesScheduleNotification + * Command KeySetRemove */ -class PowerProfileEnergyPhasesScheduleNotification : public ClusterCommand +class GroupKeyManagementKeySetRemove : public ClusterCommand { public: - PowerProfileEnergyPhasesScheduleNotification(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("energy-phases-schedule-notification", credsIssuerConfig), - mComplex_ScheduledPhases(&mRequest.scheduledPhases) + GroupKeyManagementKeySetRemove(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-remove", credsIssuerConfig) { - AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); - AddArgument("NumOfScheduledPhases", 0, UINT8_MAX, &mRequest.numOfScheduledPhases); - AddArgument("ScheduledPhases", &mComplex_ScheduledPhases); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000003, mRequest); } private: - chip::app::Clusters::PowerProfile::Commands::EnergyPhasesScheduleNotification::Type mRequest; - TypedComplexArgument> - mComplex_ScheduledPhases; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; }; /* - * Command EnergyPhasesScheduleResponse + * Command KeySetReadAllIndices */ -class PowerProfileEnergyPhasesScheduleResponse : public ClusterCommand +class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: - PowerProfileEnergyPhasesScheduleResponse(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("energy-phases-schedule-response", credsIssuerConfig), mComplex_ScheduledPhases(&mRequest.scheduledPhases) + GroupKeyManagementKeySetReadAllIndices(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-read-all-indices", credsIssuerConfig), mComplex_GroupKeySetIDs(&mRequest.groupKeySetIDs) { - AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); - AddArgument("NumOfScheduledPhases", 0, UINT8_MAX, &mRequest.numOfScheduledPhases); - AddArgument("ScheduledPhases", &mComplex_ScheduledPhases); + AddArgument("GroupKeySetIDs", &mComplex_GroupKeySetIDs); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000004, mRequest); } private: - chip::app::Clusters::PowerProfile::Commands::EnergyPhasesScheduleResponse::Type mRequest; - TypedComplexArgument> - mComplex_ScheduledPhases; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; + TypedComplexArgument> mComplex_GroupKeySetIDs; }; -/* - * Command PowerProfileScheduleConstraintsRequest - */ -class PowerProfilePowerProfileScheduleConstraintsRequest : public ClusterCommand -{ -public: - PowerProfilePowerProfileScheduleConstraintsRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("power-profile-schedule-constraints-request", credsIssuerConfig) - { - AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000006) on endpoint %u", endpointIds.at(0)); +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000006, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster UserLabel | 0x0041 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000006) on Group %u", groupId); +/*----------------------------------------------------------------------------*\ +| Cluster ProxyConfiguration | 0x0042 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000006, mRequest); - } - -private: - chip::app::Clusters::PowerProfile::Commands::PowerProfileScheduleConstraintsRequest::Type mRequest; -}; - -/* - * Command EnergyPhasesScheduleStateRequest - */ -class PowerProfileEnergyPhasesScheduleStateRequest : public ClusterCommand -{ -public: - PowerProfileEnergyPhasesScheduleStateRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("energy-phases-schedule-state-request", credsIssuerConfig) - { - AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000007) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000007, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster ProxyDiscovery | 0x0043 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000007) on Group %u", groupId); +/*----------------------------------------------------------------------------*\ +| Cluster ProxyValid | 0x0044 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000007, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster BooleanState | 0x0045 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * StateValue | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChange | 0x0000 | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::PowerProfile::Commands::EnergyPhasesScheduleStateRequest::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster ModeSelect | 0x0050 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Description | 0x0000 | +| * StandardNamespace | 0x0001 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Command GetPowerProfilePriceExtendedResponse + * Command ChangeToMode */ -class PowerProfileGetPowerProfilePriceExtendedResponse : public ClusterCommand +class ModeSelectChangeToMode : public ClusterCommand { public: - PowerProfileGetPowerProfilePriceExtendedResponse(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-power-profile-price-extended-response", credsIssuerConfig) + ModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { - AddArgument("PowerProfileId", 0, UINT8_MAX, &mRequest.powerProfileId); - AddArgument("Currency", 0, UINT16_MAX, &mRequest.currency); - AddArgument("Price", 0, UINT32_MAX, &mRequest.price); - AddArgument("PriceTrailingDigit", 0, UINT8_MAX, &mRequest.priceTrailingDigit); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000008) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000008, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000050, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001A) command (0x00000008) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000050, 0x00000000, mRequest); } private: - chip::app::Clusters::PowerProfile::Commands::GetPowerProfilePriceExtendedResponse::Type mRequest; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; }; -class WritePowerProfileScheduleMode : public WriteAttribute -{ -public: - WritePowerProfileScheduleMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ScheduleMode", credsIssuerConfig) - { - AddArgument("attr-name", "schedule-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePowerProfileScheduleMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000001A, 0x00000004, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000001A, 0x00000004, mValue); - } - -private: - uint8_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster ShadeConfiguration | 0x0100 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhysicalClosedLimit | 0x0000 | +| * MotorStepSize | 0x0001 | +| * Status | 0x0002 | +| * ClosedLimit | 0x0010 | +| * Mode | 0x0011 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster ApplianceControl | 0x001B | +| Cluster DoorLock | 0x0101 | |------------------------------------------------------------------------------| | Commands: | | -| * ExecutionOfACommand | 0x00 | -| * SignalState | 0x01 | -| * WriteFunctions | 0x02 | -| * OverloadPauseResume | 0x03 | -| * OverloadPause | 0x04 | -| * OverloadWarning | 0x05 | +| * LockDoor | 0x00 | +| * UnlockDoor | 0x01 | +| * UnlockWithTimeout | 0x03 | +| * SetWeekDaySchedule | 0x0B | +| * GetWeekDaySchedule | 0x0C | +| * ClearWeekDaySchedule | 0x0D | +| * SetYearDaySchedule | 0x0E | +| * GetYearDaySchedule | 0x0F | +| * ClearYearDaySchedule | 0x10 | +| * SetHolidaySchedule | 0x11 | +| * GetHolidaySchedule | 0x12 | +| * ClearHolidaySchedule | 0x13 | +| * SetUser | 0x1A | +| * GetUser | 0x1B | +| * ClearUser | 0x1D | +| * SetCredential | 0x22 | +| * GetCredentialStatus | 0x24 | +| * ClearCredential | 0x26 | |------------------------------------------------------------------------------| | Attributes: | | -| * StartTime | 0x0000 | -| * FinishTime | 0x0001 | -| * RemainingTime | 0x0002 | +| * LockState | 0x0000 | +| * LockType | 0x0001 | +| * ActuatorEnabled | 0x0002 | +| * DoorState | 0x0003 | +| * DoorOpenEvents | 0x0004 | +| * DoorClosedEvents | 0x0005 | +| * OpenPeriod | 0x0006 | +| * NumberOfTotalUsersSupported | 0x0011 | +| * NumberOfPINUsersSupported | 0x0012 | +| * NumberOfRFIDUsersSupported | 0x0013 | +| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | +| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | +| * NumberOfHolidaySchedulesSupported | 0x0016 | +| * MaxPINCodeLength | 0x0017 | +| * MinPINCodeLength | 0x0018 | +| * MaxRFIDCodeLength | 0x0019 | +| * MinRFIDCodeLength | 0x001A | +| * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | +| * Language | 0x0021 | +| * LEDSettings | 0x0022 | +| * AutoRelockTime | 0x0023 | +| * SoundVolume | 0x0024 | +| * OperatingMode | 0x0025 | +| * SupportedOperatingModes | 0x0026 | +| * DefaultConfigurationRegister | 0x0027 | +| * EnableLocalProgramming | 0x0028 | +| * EnableOneTouchLocking | 0x0029 | +| * EnableInsideStatusLED | 0x002A | +| * EnablePrivacyModeButton | 0x002B | +| * LocalProgrammingFeatures | 0x002C | +| * WrongCodeEntryLimit | 0x0030 | +| * UserCodeTemporaryDisableTime | 0x0031 | +| * SendPINOverTheAir | 0x0032 | +| * RequirePINforRemoteOperation | 0x0033 | +| * ExpiringUserTimeout | 0x0035 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -4031,995 +4732,871 @@ class WritePowerProfileScheduleMode : public WriteAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * DoorLockAlarm | 0x0000 | +| * DoorStateChange | 0x0001 | +| * LockOperation | 0x0002 | +| * LockOperationError | 0x0003 | +| * LockUserChange | 0x0004 | \*----------------------------------------------------------------------------*/ /* - * Command ExecutionOfACommand + * Command LockDoor */ -class ApplianceControlExecutionOfACommand : public ClusterCommand +class DoorLockLockDoor : public ClusterCommand { public: - ApplianceControlExecutionOfACommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("execution-of-acommand", credsIssuerConfig) + DoorLockLockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("lock-door", credsIssuerConfig) { - AddArgument("CommandId", 0, UINT8_MAX, &mRequest.commandId); + AddArgument("PinCode", &mRequest.pinCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000000, mRequest); } private: - chip::app::Clusters::ApplianceControl::Commands::ExecutionOfACommand::Type mRequest; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; /* - * Command SignalState + * Command UnlockDoor */ -class ApplianceControlSignalState : public ClusterCommand +class DoorLockUnlockDoor : public ClusterCommand { public: - ApplianceControlSignalState(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("signal-state", credsIssuerConfig) + DoorLockUnlockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unlock-door", credsIssuerConfig) { + AddArgument("PinCode", &mRequest.pinCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000001, mRequest); } private: - chip::app::Clusters::ApplianceControl::Commands::SignalState::Type mRequest; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; /* - * Command WriteFunctions + * Command UnlockWithTimeout */ -class ApplianceControlWriteFunctions : public ClusterCommand +class DoorLockUnlockWithTimeout : public ClusterCommand { public: - ApplianceControlWriteFunctions(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("write-functions", credsIssuerConfig), mComplex_FunctionData(&mRequest.functionData) + DoorLockUnlockWithTimeout(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("unlock-with-timeout", credsIssuerConfig) { - AddArgument("FunctionId", 0, UINT16_MAX, &mRequest.functionId); - AddArgument("FunctionDataType", 0, UINT8_MAX, &mRequest.functionDataType); - AddArgument("FunctionData", &mComplex_FunctionData); + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); + AddArgument("PinCode", &mRequest.pinCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000003, mRequest); } private: - chip::app::Clusters::ApplianceControl::Commands::WriteFunctions::Type mRequest; - TypedComplexArgument> mComplex_FunctionData; + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; /* - * Command OverloadPauseResume + * Command SetWeekDaySchedule */ -class ApplianceControlOverloadPauseResume : public ClusterCommand +class DoorLockSetWeekDaySchedule : public ClusterCommand { public: - ApplianceControlOverloadPauseResume(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("overload-pause-resume", credsIssuerConfig) + DoorLockSetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-week-day-schedule", credsIssuerConfig) { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); + AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); + AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); + AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); + AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000B, mRequest); } private: - chip::app::Clusters::ApplianceControl::Commands::OverloadPauseResume::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; /* - * Command OverloadPause + * Command GetWeekDaySchedule */ -class ApplianceControlOverloadPause : public ClusterCommand +class DoorLockGetWeekDaySchedule : public ClusterCommand { public: - ApplianceControlOverloadPause(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("overload-pause", credsIssuerConfig) + DoorLockGetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-week-day-schedule", credsIssuerConfig) { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000C, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000C, mRequest); } private: - chip::app::Clusters::ApplianceControl::Commands::OverloadPause::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; /* - * Command OverloadWarning + * Command ClearWeekDaySchedule */ -class ApplianceControlOverloadWarning : public ClusterCommand +class DoorLockClearWeekDaySchedule : public ClusterCommand { public: - ApplianceControlOverloadWarning(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("overload-warning", credsIssuerConfig) + DoorLockClearWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-week-day-schedule", credsIssuerConfig) { - AddArgument("WarningEvent", 0, UINT8_MAX, &mRequest.warningEvent); + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000001B, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000D, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000001B) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000001B, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000D, mRequest); } private: - chip::app::Clusters::ApplianceControl::Commands::OverloadWarning::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster PulseWidthModulation | 0x001C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Descriptor | 0x001D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * DeviceList | 0x0000 | -| * ServerList | 0x0001 | -| * ClientList | 0x0002 | -| * PartsList | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Binding | 0x001E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Binding | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteBindingBinding : public WriteAttribute +/* + * Command SetYearDaySchedule + */ +class DoorLockSetYearDaySchedule : public ClusterCommand { public: - WriteBindingBinding(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Binding", credsIssuerConfig), mComplex(&mValue) + DoorLockSetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-year-day-schedule", credsIssuerConfig) { - AddArgument("attr-name", "binding"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + ClusterCommand::AddArguments(); } - ~WriteBindingBinding() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000001E, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000E, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000001E, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000E, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster AccessControl | 0x001F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Acl | 0x0000 | -| * Extension | 0x0001 | -| * SubjectsPerAccessControlEntry | 0x0002 | -| * TargetsPerAccessControlEntry | 0x0003 | -| * AccessControlEntriesPerFabric | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * AccessControlEntryChanged | 0x0000 | -| * AccessControlExtensionChanged | 0x0001 | -\*----------------------------------------------------------------------------*/ - -class WriteAccessControlAcl : public WriteAttribute +/* + * Command GetYearDaySchedule + */ +class DoorLockGetYearDaySchedule : public ClusterCommand { public: - WriteAccessControlAcl(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Acl", credsIssuerConfig), mComplex(&mValue) + DoorLockGetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-year-day-schedule", credsIssuerConfig) { - AddArgument("attr-name", "acl"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~WriteAccessControlAcl() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000001F, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000F, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000001F, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000F, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> - mComplex; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; -class WriteAccessControlExtension : public WriteAttribute +/* + * Command ClearYearDaySchedule + */ +class DoorLockClearYearDaySchedule : public ClusterCommand { public: - WriteAccessControlExtension(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Extension", credsIssuerConfig), mComplex(&mValue) + DoorLockClearYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-year-day-schedule", credsIssuerConfig) { - AddArgument("attr-name", "extension"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~WriteAccessControlExtension() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000001F, 0x00000001, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000010, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000001F, 0x00000001, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000010, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> - mComplex; + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster PollControl | 0x0020 | -|------------------------------------------------------------------------------| -| Commands: | | -| * CheckInResponse | 0x00 | -| * FastPollStop | 0x01 | -| * SetLongPollInterval | 0x02 | -| * SetShortPollInterval | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CheckInInterval | 0x0000 | -| * LongPollInterval | 0x0001 | -| * ShortPollInterval | 0x0002 | -| * FastPollTimeout | 0x0003 | -| * CheckInIntervalMin | 0x0004 | -| * LongPollIntervalMin | 0x0005 | -| * FastPollTimeoutMax | 0x0006 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command CheckInResponse + * Command SetHolidaySchedule */ -class PollControlCheckInResponse : public ClusterCommand +class DoorLockSetHolidaySchedule : public ClusterCommand { public: - PollControlCheckInResponse(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("check-in-response", credsIssuerConfig) + DoorLockSetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-holiday-schedule", credsIssuerConfig) { - AddArgument("StartFastPolling", 0, 1, &mRequest.startFastPolling); - AddArgument("FastPollTimeout", 0, UINT16_MAX, &mRequest.fastPollTimeout); + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000011, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000011, mRequest); } private: - chip::app::Clusters::PollControl::Commands::CheckInResponse::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; }; /* - * Command FastPollStop + * Command GetHolidaySchedule */ -class PollControlFastPollStop : public ClusterCommand +class DoorLockGetHolidaySchedule : public ClusterCommand { public: - PollControlFastPollStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fast-poll-stop", credsIssuerConfig) + DoorLockGetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-holiday-schedule", credsIssuerConfig) { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000012, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000012, mRequest); } private: - chip::app::Clusters::PollControl::Commands::FastPollStop::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; /* - * Command SetLongPollInterval + * Command ClearHolidaySchedule */ -class PollControlSetLongPollInterval : public ClusterCommand +class DoorLockClearHolidaySchedule : public ClusterCommand { public: - PollControlSetLongPollInterval(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-long-poll-interval", credsIssuerConfig) + DoorLockClearHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-holiday-schedule", credsIssuerConfig) { - AddArgument("NewLongPollInterval", 0, UINT32_MAX, &mRequest.newLongPollInterval); + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000013, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000013, mRequest); } private: - chip::app::Clusters::PollControl::Commands::SetLongPollInterval::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; }; /* - * Command SetShortPollInterval + * Command SetUser */ -class PollControlSetShortPollInterval : public ClusterCommand +class DoorLockSetUser : public ClusterCommand { public: - PollControlSetShortPollInterval(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-short-poll-interval", credsIssuerConfig) + DoorLockSetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-user", credsIssuerConfig) { - AddArgument("NewShortPollInterval", 0, UINT16_MAX, &mRequest.newShortPollInterval); + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserName", &mRequest.userName); + AddArgument("UserUniqueId", 0, UINT32_MAX, &mRequest.userUniqueId); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000020) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::PollControl::Commands::SetShortPollInterval::Type mRequest; -}; - -class WritePollControlCheckInInterval : public WriteAttribute -{ -public: - WritePollControlCheckInInterval(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("CheckInInterval", credsIssuerConfig) - { - AddArgument("attr-name", "check-in-interval"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePollControlCheckInInterval() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000000, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001A, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000000, mValue); - } - -private: - uint32_t mValue; -}; - -class WritePollControlFastPollTimeout : public WriteAttribute -{ -public: - WritePollControlFastPollTimeout(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("FastPollTimeout", credsIssuerConfig) - { - AddArgument("attr-name", "fast-poll-timeout"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePollControlFastPollTimeout() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000020, 0x00000003, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000020, 0x00000003, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001A, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster BridgedActions | 0x0025 | -|------------------------------------------------------------------------------| -| Commands: | | -| * InstantAction | 0x00 | -| * InstantActionWithTransition | 0x01 | -| * StartAction | 0x02 | -| * StartActionWithDuration | 0x03 | -| * StopAction | 0x04 | -| * PauseAction | 0x05 | -| * PauseActionWithDuration | 0x06 | -| * ResumeAction | 0x07 | -| * EnableAction | 0x08 | -| * EnableActionWithDuration | 0x09 | -| * DisableAction | 0x0A | -| * DisableActionWithDuration | 0x0B | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ActionList | 0x0000 | -| * EndpointList | 0x0001 | -| * SetupUrl | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChanged | 0x0000 | -| * ActionFailed | 0x0001 | -\*----------------------------------------------------------------------------*/ - /* - * Command InstantAction + * Command GetUser */ -class BridgedActionsInstantAction : public ClusterCommand +class DoorLockGetUser : public ClusterCommand { public: - BridgedActionsInstantAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("instant-action", credsIssuerConfig) + DoorLockGetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-user", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001B, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::InstantAction::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; /* - * Command InstantActionWithTransition + * Command ClearUser */ -class BridgedActionsInstantActionWithTransition : public ClusterCommand +class DoorLockClearUser : public ClusterCommand { public: - BridgedActionsInstantActionWithTransition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("instant-action-with-transition", credsIssuerConfig) + DoorLockClearUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("clear-user", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000001, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001D, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000001, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001D, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; }; /* - * Command StartAction + * Command SetCredential */ -class BridgedActionsStartAction : public ClusterCommand +class DoorLockSetCredential : public ClusterCommand { public: - BridgedActionsStartAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-action", credsIssuerConfig) + DoorLockSetCredential(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("Credential", &mComplex_Credential); + AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000022, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000022, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::StartAction::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Command StartActionWithDuration + * Command GetCredentialStatus */ -class BridgedActionsStartActionWithDuration : public ClusterCommand +class DoorLockGetCredentialStatus : public ClusterCommand { public: - BridgedActionsStartActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("start-action-with-duration", credsIssuerConfig) + DoorLockGetCredentialStatus(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-credential-status", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000024, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000024, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Command StopAction + * Command ClearCredential */ -class BridgedActionsStopAction : public ClusterCommand +class DoorLockClearCredential : public ClusterCommand { public: - BridgedActionsStopAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-action", credsIssuerConfig) + DoorLockClearCredential(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000026, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000026, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::StopAction::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; + TypedComplexArgument> + mComplex_Credential; }; -/* - * Command PauseAction +/*----------------------------------------------------------------------------*\ +| Cluster WindowCovering | 0x0102 | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpOrOpen | 0x00 | +| * DownOrClose | 0x01 | +| * StopMotion | 0x02 | +| * GoToLiftValue | 0x04 | +| * GoToLiftPercentage | 0x05 | +| * GoToTiltValue | 0x07 | +| * GoToTiltPercentage | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Type | 0x0000 | +| * PhysicalClosedLimitLift | 0x0001 | +| * PhysicalClosedLimitTilt | 0x0002 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * NumberOfActuationsLift | 0x0005 | +| * NumberOfActuationsTilt | 0x0006 | +| * ConfigStatus | 0x0007 | +| * CurrentPositionLiftPercentage | 0x0008 | +| * CurrentPositionTiltPercentage | 0x0009 | +| * OperationalStatus | 0x000A | +| * TargetPositionLiftPercent100ths | 0x000B | +| * TargetPositionTiltPercent100ths | 0x000C | +| * EndProductType | 0x000D | +| * CurrentPositionLiftPercent100ths | 0x000E | +| * CurrentPositionTiltPercent100ths | 0x000F | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * SafetyStatus | 0x001A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command UpOrOpen */ -class BridgedActionsPauseAction : public ClusterCommand +class WindowCoveringUpOrOpen : public ClusterCommand { public: - BridgedActionsPauseAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause-action", credsIssuerConfig) + WindowCoveringUpOrOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("up-or-open", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000005, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000005, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000000, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::PauseAction::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type mRequest; }; /* - * Command PauseActionWithDuration + * Command DownOrClose */ -class BridgedActionsPauseActionWithDuration : public ClusterCommand +class WindowCoveringDownOrClose : public ClusterCommand { public: - BridgedActionsPauseActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("pause-action-with-duration", credsIssuerConfig) + WindowCoveringDownOrClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("down-or-close", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000006, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000006, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000001, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type mRequest; }; /* - * Command ResumeAction + * Command StopMotion */ -class BridgedActionsResumeAction : public ClusterCommand +class WindowCoveringStopMotion : public ClusterCommand { public: - BridgedActionsResumeAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume-action", credsIssuerConfig) + WindowCoveringStopMotion(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-motion", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000007, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000007, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000002, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::ResumeAction::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::StopMotion::Type mRequest; }; /* - * Command EnableAction + * Command GoToLiftValue */ -class BridgedActionsEnableAction : public ClusterCommand +class WindowCoveringGoToLiftValue : public ClusterCommand { public: - BridgedActionsEnableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enable-action", credsIssuerConfig) + WindowCoveringGoToLiftValue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-lift-value", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000008, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000004, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::EnableAction::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; /* - * Command EnableActionWithDuration + * Command GoToLiftPercentage */ -class BridgedActionsEnableActionWithDuration : public ClusterCommand +class WindowCoveringGoToLiftPercentage : public ClusterCommand { public: - BridgedActionsEnableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enable-action-with-duration", credsIssuerConfig) + WindowCoveringGoToLiftPercentage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-lift-percentage", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x00000009, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x00000009, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000005, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; /* - * Command DisableAction + * Command GoToTiltValue */ -class BridgedActionsDisableAction : public ClusterCommand +class WindowCoveringGoToTiltValue : public ClusterCommand { public: - BridgedActionsDisableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("disable-action", credsIssuerConfig) + WindowCoveringGoToTiltValue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-tilt-value", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x0000000A, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x0000000A, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000007, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::DisableAction::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; }; /* - * Command DisableActionWithDuration + * Command GoToTiltPercentage */ -class BridgedActionsDisableActionWithDuration : public ClusterCommand +class WindowCoveringGoToTiltPercentage : public ClusterCommand { public: - BridgedActionsDisableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("disable-action-with-duration", credsIssuerConfig) + WindowCoveringGoToTiltPercentage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("go-to-tilt-percentage", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000025, 0x0000000B, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000025, 0x0000000B, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000008, mRequest); } private: - chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type mRequest; + chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster Basic | 0x0028 | +| Cluster BarrierControl | 0x0103 | |------------------------------------------------------------------------------| | Commands: | | -| * MfgSpecificPing | 0x00 | +| * BarrierControlGoToPercent | 0x00 | +| * BarrierControlStop | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * DataModelRevision | 0x0000 | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * ProductID | 0x0004 | -| * NodeLabel | 0x0005 | -| * Location | 0x0006 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * LocalConfigDisabled | 0x0010 | -| * Reachable | 0x0011 | -| * UniqueID | 0x0012 | -| * CapabilityMinima | 0x0013 | +| * BarrierMovingState | 0x0001 | +| * BarrierSafetyStatus | 0x0002 | +| * BarrierCapabilities | 0x0003 | +| * BarrierOpenEvents | 0x0004 | +| * BarrierCloseEvents | 0x0005 | +| * BarrierCommandOpenEvents | 0x0006 | +| * BarrierCommandCloseEvents | 0x0007 | +| * BarrierOpenPeriod | 0x0008 | +| * BarrierClosePeriod | 0x0009 | +| * BarrierPosition | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -5027,338 +5604,363 @@ class BridgedActionsDisableActionWithDuration : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StartUp | 0x0000 | -| * ShutDown | 0x0001 | -| * Leave | 0x0002 | -| * ReachableChanged | 0x0003 | \*----------------------------------------------------------------------------*/ /* - * Command MfgSpecificPing + * Command BarrierControlGoToPercent */ -class BasicMfgSpecificPing : public ClusterCommand +class BarrierControlBarrierControlGoToPercent : public ClusterCommand { public: - BasicMfgSpecificPing(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("mfg-specific-ping", credsIssuerConfig) + BarrierControlBarrierControlGoToPercent(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("barrier-control-go-to-percent", credsIssuerConfig) { + AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000028, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000028, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000000, mRequest); } private: - chip::app::Clusters::Basic::Commands::MfgSpecificPing::Type mRequest; + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; }; -class WriteBasicNodeLabel : public WriteAttribute +/* + * Command BarrierControlStop + */ +class BarrierControlBarrierControlStop : public ClusterCommand { public: - WriteBasicNodeLabel(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("NodeLabel", credsIssuerConfig) + BarrierControlBarrierControlStop(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("barrier-control-stop", credsIssuerConfig) { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteBasicNodeLabel() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000028, 0x00000005, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000028, 0x00000005, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000001, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type mRequest; }; -class WriteBasicLocation : public WriteAttribute -{ -public: - WriteBasicLocation(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Location", credsIssuerConfig) - { - AddArgument("attr-name", "location"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBasicLocation() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000028, 0x00000006, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000028, 0x00000006, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster PumpConfigurationAndControl | 0x0200 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MaxPressure | 0x0000 | +| * MaxSpeed | 0x0001 | +| * MaxFlow | 0x0002 | +| * MinConstPressure | 0x0003 | +| * MaxConstPressure | 0x0004 | +| * MinCompPressure | 0x0005 | +| * MaxCompPressure | 0x0006 | +| * MinConstSpeed | 0x0007 | +| * MaxConstSpeed | 0x0008 | +| * MinConstFlow | 0x0009 | +| * MaxConstFlow | 0x000A | +| * MinConstTemp | 0x000B | +| * MaxConstTemp | 0x000C | +| * PumpStatus | 0x0010 | +| * EffectiveOperationMode | 0x0011 | +| * EffectiveControlMode | 0x0012 | +| * Capacity | 0x0013 | +| * Speed | 0x0014 | +| * LifetimeRunningHours | 0x0015 | +| * Power | 0x0016 | +| * LifetimeEnergyConsumed | 0x0017 | +| * OperationMode | 0x0020 | +| * ControlMode | 0x0021 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SupplyVoltageLow | 0x0000 | +| * SupplyVoltageHigh | 0x0001 | +| * PowerMissingPhase | 0x0002 | +| * SystemPressureLow | 0x0003 | +| * SystemPressureHigh | 0x0004 | +| * DryRunning | 0x0005 | +| * MotorTemperatureHigh | 0x0006 | +| * PumpMotorFatalFailure | 0x0007 | +| * ElectronicTemperatureHigh | 0x0008 | +| * PumpBlocked | 0x0009 | +| * SensorFailure | 0x000A | +| * ElectronicNonFatalFailure | 0x000B | +| * ElectronicFatalFailure | 0x000C | +| * GeneralFault | 0x000D | +| * Leakage | 0x000E | +| * AirDetection | 0x000F | +| * TurbineOperation | 0x0010 | +\*----------------------------------------------------------------------------*/ -private: - chip::CharSpan mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster Thermostat | 0x0201 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteBasicLocalConfigDisabled : public WriteAttribute +/* + * Command SetpointRaiseLower + */ +class ThermostatSetpointRaiseLower : public ClusterCommand { public: - WriteBasicLocalConfigDisabled(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LocalConfigDisabled", credsIssuerConfig) + ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("setpoint-raise-lower", credsIssuerConfig) { - AddArgument("attr-name", "local-config-disabled"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); } - ~WriteBasicLocalConfigDisabled() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000028, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000028, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000000, mRequest); } private: - bool mValue; + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster OtaSoftwareUpdateProvider | 0x0029 | -|------------------------------------------------------------------------------| -| Commands: | | -| * QueryImage | 0x00 | -| * ApplyUpdateRequest | 0x02 | -| * NotifyUpdateApplied | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command QueryImage + * Command SetWeeklySchedule */ -class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand +class ThermostatSetWeeklySchedule : public ClusterCommand { public: - OtaSoftwareUpdateProviderQueryImage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("query-image", credsIssuerConfig), mComplex_ProtocolsSupported(&mRequest.protocolsSupported) + ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) { - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); - AddArgument("ProductId", 0, UINT16_MAX, &mRequest.productId); - AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); - AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); - AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); - AddArgument("Location", &mRequest.location); - AddArgument("RequestorCanConsent", 0, 1, &mRequest.requestorCanConsent); - AddArgument("MetadataForProvider", &mRequest.metadataForProvider); + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000001, mRequest); } private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; - TypedComplexArgument> - mComplex_ProtocolsSupported; + chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_Transitions; }; /* - * Command ApplyUpdateRequest + * Command GetWeeklySchedule */ -class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand +class ThermostatGetWeeklySchedule : public ClusterCommand { public: - OtaSoftwareUpdateProviderApplyUpdateRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("apply-update-request", credsIssuerConfig) + ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-weekly-schedule", credsIssuerConfig) { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000002, mRequest); } private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; }; /* - * Command NotifyUpdateApplied + * Command ClearWeeklySchedule */ -class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand +class ThermostatClearWeeklySchedule : public ClusterCommand { public: - OtaSoftwareUpdateProviderNotifyUpdateApplied(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("notify-update-applied", credsIssuerConfig) + ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-weekly-schedule", credsIssuerConfig) { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000029, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000029, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000003, mRequest); } private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; + chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OtaSoftwareUpdateRequestor | 0x002A | +| Cluster FanControl | 0x0202 | |------------------------------------------------------------------------------| | Commands: | | -| * AnnounceOtaProvider | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * DefaultOtaProviders | 0x0000 | -| * UpdatePossible | 0x0001 | -| * UpdateState | 0x0002 | -| * UpdateStateProgress | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | +| * FanMode | 0x0000 | +| * FanModeSequence | 0x0001 | +| * PercentSetting | 0x0002 | +| * PercentCurrent | 0x0003 | +| * SpeedMax | 0x0004 | +| * SpeedSetting | 0x0005 | +| * SpeedCurrent | 0x0006 | +| * RockSupport | 0x0007 | +| * RockSetting | 0x0008 | +| * WindSupport | 0x0009 | +| * WindSetting | 0x000A | +| * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StateTransition | 0x0000 | -| * VersionApplied | 0x0001 | -| * DownloadError | 0x0002 | \*----------------------------------------------------------------------------*/ -/* - * Command AnnounceOtaProvider - */ -class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand -{ -public: - OtaSoftwareUpdateRequestorAnnounceOtaProvider(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("announce-ota-provider", credsIssuerConfig) - { - AddArgument("ProviderNodeId", 0, UINT64_MAX, &mRequest.providerNodeId); - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); - AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); - AddArgument("MetadataForNode", &mRequest.metadataForNode); - AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000002A, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000002A, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type mRequest; -}; - -class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute -{ -public: - WriteOtaSoftwareUpdateRequestorDefaultOtaProviders(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("DefaultOtaProviders", credsIssuerConfig), mComplex(&mValue) - { - AddArgument("attr-name", "default-ota-providers"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteOtaSoftwareUpdateRequestorDefaultOtaProviders() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000002A, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000002A, 0x00000000, mValue); - } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex; -}; - /*----------------------------------------------------------------------------*\ -| Cluster LocalizationConfiguration | 0x002B | +| Cluster DehumidificationControl | 0x0203 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * ActiveLocale | 0x0000 | -| * SupportedLocales | 0x0001 | +| * RelativeHumidity | 0x0000 | +| * DehumidificationCooling | 0x0001 | +| * RhDehumidificationSetpoint | 0x0010 | +| * RelativeHumidityMode | 0x0011 | +| * DehumidificationLockout | 0x0012 | +| * DehumidificationHysteresis | 0x0013 | +| * DehumidificationMaxCool | 0x0014 | +| * RelativeHumidityDisplay | 0x0015 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -5368,42 +5970,101 @@ class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute | Events: | | \*----------------------------------------------------------------------------*/ -class WriteLocalizationConfigurationActiveLocale : public WriteAttribute -{ -public: - WriteLocalizationConfigurationActiveLocale(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ActiveLocale", credsIssuerConfig) - { - AddArgument("attr-name", "active-locale"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLocalizationConfigurationActiveLocale() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000002B, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000002B, 0x00000000, mValue); - } - -private: - chip::CharSpan mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureDisplayMode | 0x0000 | +| * KeypadLockout | 0x0001 | +| * ScheduleProgrammingVisibility | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster TimeFormatLocalization | 0x002C | +| Cluster ColorControl | 0x0300 | |------------------------------------------------------------------------------| | Commands: | | +| * MoveToHue | 0x00 | +| * MoveHue | 0x01 | +| * StepHue | 0x02 | +| * MoveToSaturation | 0x03 | +| * MoveSaturation | 0x04 | +| * StepSaturation | 0x05 | +| * MoveToHueAndSaturation | 0x06 | +| * MoveToColor | 0x07 | +| * MoveColor | 0x08 | +| * StepColor | 0x09 | +| * MoveToColorTemperature | 0x0A | +| * EnhancedMoveToHue | 0x40 | +| * EnhancedMoveHue | 0x41 | +| * EnhancedStepHue | 0x42 | +| * EnhancedMoveToHueAndSaturation | 0x43 | +| * ColorLoopSet | 0x44 | +| * StopMoveStep | 0x47 | +| * MoveColorTemperature | 0x4B | +| * StepColorTemperature | 0x4C | |------------------------------------------------------------------------------| | Attributes: | | -| * HourFormat | 0x0000 | -| * ActiveCalendarType | 0x0001 | -| * SupportedCalendarTypes | 0x0002 | +| * CurrentHue | 0x0000 | +| * CurrentSaturation | 0x0001 | +| * RemainingTime | 0x0002 | +| * CurrentX | 0x0003 | +| * CurrentY | 0x0004 | +| * DriftCompensation | 0x0005 | +| * CompensationText | 0x0006 | +| * ColorTemperature | 0x0007 | +| * ColorMode | 0x0008 | +| * Options | 0x000F | +| * NumberOfPrimaries | 0x0010 | +| * Primary1X | 0x0011 | +| * Primary1Y | 0x0012 | +| * Primary1Intensity | 0x0013 | +| * Primary2X | 0x0015 | +| * Primary2Y | 0x0016 | +| * Primary2Intensity | 0x0017 | +| * Primary3X | 0x0019 | +| * Primary3Y | 0x001A | +| * Primary3Intensity | 0x001B | +| * Primary4X | 0x0020 | +| * Primary4Y | 0x0021 | +| * Primary4Intensity | 0x0022 | +| * Primary5X | 0x0024 | +| * Primary5Y | 0x0025 | +| * Primary5Intensity | 0x0026 | +| * Primary6X | 0x0028 | +| * Primary6Y | 0x0029 | +| * Primary6Intensity | 0x002A | +| * WhitePointX | 0x0030 | +| * WhitePointY | 0x0031 | +| * ColorPointRX | 0x0032 | +| * ColorPointRY | 0x0033 | +| * ColorPointRIntensity | 0x0034 | +| * ColorPointGX | 0x0036 | +| * ColorPointGY | 0x0037 | +| * ColorPointGIntensity | 0x0038 | +| * ColorPointBX | 0x003A | +| * ColorPointBY | 0x003B | +| * ColorPointBIntensity | 0x003C | +| * EnhancedCurrentHue | 0x4000 | +| * EnhancedColorMode | 0x4001 | +| * ColorLoopActive | 0x4002 | +| * ColorLoopDirection | 0x4003 | +| * ColorLoopTime | 0x4004 | +| * ColorLoopStartEnhancedHue | 0x4005 | +| * ColorLoopStoredEnhancedHue | 0x4006 | +| * ColorCapabilities | 0x400A | +| * ColorTempPhysicalMinMireds | 0x400B | +| * ColorTempPhysicalMaxMireds | 0x400C | +| * CoupleColorTempToLevelMinMireds | 0x400D | +| * StartUpColorTemperatureMireds | 0x4010 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -5413,909 +6074,679 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute | Events: | | \*----------------------------------------------------------------------------*/ -class WriteTimeFormatLocalizationHourFormat : public WriteAttribute +/* + * Command MoveToHue + */ +class ColorControlMoveToHue : public ClusterCommand { public: - WriteTimeFormatLocalizationHourFormat(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("HourFormat", credsIssuerConfig) + ColorControlMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-hue", credsIssuerConfig) { - AddArgument("attr-name", "hour-format"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~WriteTimeFormatLocalizationHourFormat() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000002C, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000002C, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000000, mRequest); } private: - chip::app::Clusters::TimeFormatLocalization::HourFormat mValue; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; }; -class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute +/* + * Command MoveHue + */ +class ColorControlMoveHue : public ClusterCommand { public: - WriteTimeFormatLocalizationActiveCalendarType(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ActiveCalendarType", credsIssuerConfig) + ColorControlMoveHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-hue", credsIssuerConfig) { - AddArgument("attr-name", "active-calendar-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~WriteTimeFormatLocalizationActiveCalendarType() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000002C, 0x00000001, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000002C, 0x00000001, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000001, mRequest); } private: - chip::app::Clusters::TimeFormatLocalization::CalendarType mValue; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster UnitLocalization | 0x002D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureUnit | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteUnitLocalizationTemperatureUnit : public WriteAttribute +/* + * Command StepHue + */ +class ColorControlStepHue : public ClusterCommand { public: - WriteUnitLocalizationTemperatureUnit(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("TemperatureUnit", credsIssuerConfig) + ColorControlStepHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-hue", credsIssuerConfig) { - AddArgument("attr-name", "temperature-unit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~WriteUnitLocalizationTemperatureUnit() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000002D, 0x00000000, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000002, mRequest); + } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000002D, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000002, mRequest); } private: - chip::app::Clusters::UnitLocalization::TempUnit mValue; + chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster PowerSourceConfiguration | 0x002E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Sources | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster PowerSource | 0x002F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Status | 0x0000 | -| * Order | 0x0001 | -| * Description | 0x0002 | -| * WiredAssessedInputVoltage | 0x0003 | -| * WiredAssessedInputFrequency | 0x0004 | -| * WiredCurrentType | 0x0005 | -| * WiredAssessedCurrent | 0x0006 | -| * WiredNominalVoltage | 0x0007 | -| * WiredMaximumCurrent | 0x0008 | -| * WiredPresent | 0x0009 | -| * ActiveWiredFaults | 0x000A | -| * BatteryVoltage | 0x000B | -| * BatteryPercentRemaining | 0x000C | -| * BatteryTimeRemaining | 0x000D | -| * BatteryChargeLevel | 0x000E | -| * BatteryReplacementNeeded | 0x000F | -| * BatteryReplaceability | 0x0010 | -| * BatteryPresent | 0x0011 | -| * ActiveBatteryFaults | 0x0012 | -| * BatteryReplacementDescription | 0x0013 | -| * BatteryCommonDesignation | 0x0014 | -| * BatteryANSIDesignation | 0x0015 | -| * BatteryIECDesignation | 0x0016 | -| * BatteryApprovedChemistry | 0x0017 | -| * BatteryCapacity | 0x0018 | -| * BatteryQuantity | 0x0019 | -| * BatteryChargeState | 0x001A | -| * BatteryTimeToFullCharge | 0x001B | -| * BatteryFunctionalWhileCharging | 0x001C | -| * BatteryChargingCurrent | 0x001D | -| * ActiveBatteryChargeFaults | 0x001E | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster GeneralCommissioning | 0x0030 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ArmFailSafe | 0x00 | -| * SetRegulatoryConfig | 0x02 | -| * CommissioningComplete | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Breadcrumb | 0x0000 | -| * BasicCommissioningInfo | 0x0001 | -| * RegulatoryConfig | 0x0002 | -| * LocationCapability | 0x0003 | -| * SupportsConcurrentConnection | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ArmFailSafe + * Command MoveToSaturation */ -class GeneralCommissioningArmFailSafe : public ClusterCommand +class ColorControlMoveToSaturation : public ClusterCommand { public: - GeneralCommissioningArmFailSafe(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("arm-fail-safe", credsIssuerConfig) + ColorControlMoveToSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-saturation", credsIssuerConfig) { - AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000003, mRequest); } private: - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; }; /* - * Command SetRegulatoryConfig + * Command MoveSaturation */ -class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand +class ColorControlMoveSaturation : public ClusterCommand { public: - GeneralCommissioningSetRegulatoryConfig(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-regulatory-config", credsIssuerConfig) + ColorControlMoveSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-saturation", credsIssuerConfig) { - AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); - AddArgument("CountryCode", &mRequest.countryCode); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000004, mRequest); } private: - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; }; /* - * Command CommissioningComplete + * Command StepSaturation */ -class GeneralCommissioningCommissioningComplete : public ClusterCommand +class ColorControlStepSaturation : public ClusterCommand { public: - GeneralCommissioningCommissioningComplete(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("commissioning-complete", credsIssuerConfig) + ColorControlStepSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-saturation", credsIssuerConfig) { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000005, mRequest); } private: - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; -class WriteGeneralCommissioningBreadcrumb : public WriteAttribute +/* + * Command MoveToHueAndSaturation + */ +class ColorControlMoveToHueAndSaturation : public ClusterCommand { public: - WriteGeneralCommissioningBreadcrumb(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("Breadcrumb", credsIssuerConfig) + ColorControlMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-hue-and-saturation", credsIssuerConfig) { - AddArgument("attr-name", "breadcrumb"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~WriteGeneralCommissioningBreadcrumb() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000030, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000030, 0x00000000, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000006, mRequest); } private: - uint64_t mValue; + chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster NetworkCommissioning | 0x0031 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ScanNetworks | 0x00 | -| * AddOrUpdateWiFiNetwork | 0x02 | -| * AddOrUpdateThreadNetwork | 0x03 | -| * RemoveNetwork | 0x04 | -| * ConnectNetwork | 0x06 | -| * ReorderNetwork | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxNetworks | 0x0000 | -| * Networks | 0x0001 | -| * ScanMaxTimeSeconds | 0x0002 | -| * ConnectMaxTimeSeconds | 0x0003 | -| * InterfaceEnabled | 0x0004 | -| * LastNetworkingStatus | 0x0005 | -| * LastNetworkID | 0x0006 | -| * LastConnectErrorValue | 0x0007 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ScanNetworks + * Command MoveToColor */ -class NetworkCommissioningScanNetworks : public ClusterCommand +class ColorControlMoveToColor : public ClusterCommand { public: - NetworkCommissioningScanNetworks(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("scan-networks", credsIssuerConfig) + ColorControlMoveToColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-color", credsIssuerConfig) { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); + AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000007, mRequest); } private: - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; /* - * Command AddOrUpdateWiFiNetwork + * Command MoveColor */ -class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand +class ColorControlMoveColor : public ClusterCommand { public: - NetworkCommissioningAddOrUpdateWiFiNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-or-update-wi-fi-network", credsIssuerConfig) + ColorControlMoveColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-color", credsIssuerConfig) { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Credentials", &mRequest.credentials); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); + AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000002, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000002, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000008, mRequest); } private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; /* - * Command AddOrUpdateThreadNetwork + * Command StepColor */ -class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand +class ColorControlStepColor : public ClusterCommand { public: - NetworkCommissioningAddOrUpdateThreadNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-or-update-thread-network", credsIssuerConfig) + ColorControlStepColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-color", credsIssuerConfig) { - AddArgument("OperationalDataset", &mRequest.operationalDataset); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); + AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000003, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000009, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000003) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000003, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000009, mRequest); } private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; }; /* - * Command RemoveNetwork + * Command MoveToColorTemperature */ -class NetworkCommissioningRemoveNetwork : public ClusterCommand +class ColorControlMoveToColorTemperature : public ClusterCommand { public: - NetworkCommissioningRemoveNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("remove-network", credsIssuerConfig) + ColorControlMoveToColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-color-temperature", credsIssuerConfig) { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("ColorTemperature", 0, UINT16_MAX, &mRequest.colorTemperature); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000004, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000000A, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000004, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000000A, mRequest); } private: - chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; /* - * Command ConnectNetwork + * Command EnhancedMoveToHue */ -class NetworkCommissioningConnectNetwork : public ClusterCommand +class ColorControlEnhancedMoveToHue : public ClusterCommand { public: - NetworkCommissioningConnectNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("connect-network", credsIssuerConfig) + ColorControlEnhancedMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-to-hue", credsIssuerConfig) { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000006, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000040, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000006, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000040, mRequest); } private: - chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type mRequest; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; }; /* - * Command ReorderNetwork + * Command EnhancedMoveHue */ -class NetworkCommissioningReorderNetwork : public ClusterCommand +class ColorControlEnhancedMoveHue : public ClusterCommand { public: - NetworkCommissioningReorderNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reorder-network", credsIssuerConfig) + ColorControlEnhancedMoveHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-hue", credsIssuerConfig) { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("NetworkIndex", 0, UINT8_MAX, &mRequest.networkIndex); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000008, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000041, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000008, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000041, mRequest); } private: - chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; }; -class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute +/* + * Command EnhancedStepHue + */ +class ColorControlEnhancedStepHue : public ClusterCommand { public: - WriteNetworkCommissioningInterfaceEnabled(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("InterfaceEnabled", credsIssuerConfig) + ColorControlEnhancedStepHue(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-step-hue", credsIssuerConfig) { - AddArgument("attr-name", "interface-enabled"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } - ~WriteNetworkCommissioningInterfaceEnabled() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000031, 0x00000004, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000042, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000031, 0x00000004, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000042, mRequest); } private: - bool mValue; + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster DiagnosticLogs | 0x0032 | -|------------------------------------------------------------------------------| -| Commands: | | -| * RetrieveLogsRequest | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command RetrieveLogsRequest + * Command EnhancedMoveToHueAndSaturation */ -class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand +class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { public: - DiagnosticLogsRetrieveLogsRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("retrieve-logs-request", credsIssuerConfig) + ColorControlEnhancedMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-move-to-hue-and-saturation", credsIssuerConfig) { - AddArgument("Intent", 0, UINT8_MAX, &mRequest.intent); - AddArgument("RequestedProtocol", 0, UINT8_MAX, &mRequest.requestedProtocol); - AddArgument("TransferFileDesignator", &mRequest.transferFileDesignator); + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000032, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000043, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000032, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000043, mRequest); } private: - chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type mRequest; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster GeneralDiagnostics | 0x0033 | -|------------------------------------------------------------------------------| -| Commands: | | -| * TestEventTrigger | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * NetworkInterfaces | 0x0000 | -| * RebootCount | 0x0001 | -| * UpTime | 0x0002 | -| * TotalOperationalHours | 0x0003 | -| * BootReasons | 0x0004 | -| * ActiveHardwareFaults | 0x0005 | -| * ActiveRadioFaults | 0x0006 | -| * ActiveNetworkFaults | 0x0007 | -| * TestEventTriggersEnabled | 0x0008 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * HardwareFaultChange | 0x0000 | -| * RadioFaultChange | 0x0001 | -| * NetworkFaultChange | 0x0002 | -| * BootReason | 0x0003 | -\*----------------------------------------------------------------------------*/ - /* - * Command TestEventTrigger + * Command ColorLoopSet */ -class GeneralDiagnosticsTestEventTrigger : public ClusterCommand +class ColorControlColorLoopSet : public ClusterCommand { public: - GeneralDiagnosticsTestEventTrigger(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-event-trigger", credsIssuerConfig) + ColorControlColorLoopSet(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("color-loop-set", credsIssuerConfig) { - AddArgument("EnableKey", &mRequest.enableKey); - AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); + AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); + AddArgument("Action", 0, UINT8_MAX, &mRequest.action); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Time", 0, UINT16_MAX, &mRequest.time); + AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000033, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000044, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000033, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000044, mRequest); } private: - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; + chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster SoftwareDiagnostics | 0x0034 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetWatermarks | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ThreadMetrics | 0x0000 | -| * CurrentHeapFree | 0x0001 | -| * CurrentHeapUsed | 0x0002 | -| * CurrentHeapHighWatermark | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SoftwareFault | 0x0000 | -\*----------------------------------------------------------------------------*/ - /* - * Command ResetWatermarks + * Command StopMoveStep */ -class SoftwareDiagnosticsResetWatermarks : public ClusterCommand +class ColorControlStopMoveStep : public ClusterCommand { public: - SoftwareDiagnosticsResetWatermarks(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-watermarks", credsIssuerConfig) + ColorControlStopMoveStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-move-step", credsIssuerConfig) { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000034, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000047, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000034, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000047, mRequest); } private: - chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster ThreadNetworkDiagnostics | 0x0035 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCounts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Channel | 0x0000 | -| * RoutingRole | 0x0001 | -| * NetworkName | 0x0002 | -| * PanId | 0x0003 | -| * ExtendedPanId | 0x0004 | -| * MeshLocalPrefix | 0x0005 | -| * OverrunCount | 0x0006 | -| * NeighborTableList | 0x0007 | -| * RouteTableList | 0x0008 | -| * PartitionId | 0x0009 | -| * Weighting | 0x000A | -| * DataVersion | 0x000B | -| * StableDataVersion | 0x000C | -| * LeaderRouterId | 0x000D | -| * DetachedRoleCount | 0x000E | -| * ChildRoleCount | 0x000F | -| * RouterRoleCount | 0x0010 | -| * LeaderRoleCount | 0x0011 | -| * AttachAttemptCount | 0x0012 | -| * PartitionIdChangeCount | 0x0013 | -| * BetterPartitionAttachAttemptCount | 0x0014 | -| * ParentChangeCount | 0x0015 | -| * TxTotalCount | 0x0016 | -| * TxUnicastCount | 0x0017 | -| * TxBroadcastCount | 0x0018 | -| * TxAckRequestedCount | 0x0019 | -| * TxAckedCount | 0x001A | -| * TxNoAckRequestedCount | 0x001B | -| * TxDataCount | 0x001C | -| * TxDataPollCount | 0x001D | -| * TxBeaconCount | 0x001E | -| * TxBeaconRequestCount | 0x001F | -| * TxOtherCount | 0x0020 | -| * TxRetryCount | 0x0021 | -| * TxDirectMaxRetryExpiryCount | 0x0022 | -| * TxIndirectMaxRetryExpiryCount | 0x0023 | -| * TxErrCcaCount | 0x0024 | -| * TxErrAbortCount | 0x0025 | -| * TxErrBusyChannelCount | 0x0026 | -| * RxTotalCount | 0x0027 | -| * RxUnicastCount | 0x0028 | -| * RxBroadcastCount | 0x0029 | -| * RxDataCount | 0x002A | -| * RxDataPollCount | 0x002B | -| * RxBeaconCount | 0x002C | -| * RxBeaconRequestCount | 0x002D | -| * RxOtherCount | 0x002E | -| * RxAddressFilteredCount | 0x002F | -| * RxDestAddrFilteredCount | 0x0030 | -| * RxDuplicatedCount | 0x0031 | -| * RxErrNoFrameCount | 0x0032 | -| * RxErrUnknownNeighborCount | 0x0033 | -| * RxErrInvalidSrcAddrCount | 0x0034 | -| * RxErrSecCount | 0x0035 | -| * RxErrFcsCount | 0x0036 | -| * RxErrOtherCount | 0x0037 | -| * ActiveTimestamp | 0x0038 | -| * PendingTimestamp | 0x0039 | -| * Delay | 0x003A | -| * SecurityPolicy | 0x003B | -| * ChannelMask | 0x003C | -| * OperationalDatasetComponents | 0x003D | -| * ActiveNetworkFaultsList | 0x003E | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * ConnectionStatus | 0x0000 | -\*----------------------------------------------------------------------------*/ - /* - * Command ResetCounts + * Command MoveColorTemperature */ -class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand +class ColorControlMoveColorTemperature : public ClusterCommand { public: - ThreadNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-counts", credsIssuerConfig) + ColorControlMoveColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-color-temperature", credsIssuerConfig) { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000035, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000035, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004B, mRequest); } private: - chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster WiFiNetworkDiagnostics | 0x0036 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCounts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Bssid | 0x0000 | -| * SecurityType | 0x0001 | -| * WiFiVersion | 0x0002 | -| * ChannelNumber | 0x0003 | -| * Rssi | 0x0004 | -| * BeaconLostCount | 0x0005 | -| * BeaconRxCount | 0x0006 | -| * PacketMulticastRxCount | 0x0007 | -| * PacketMulticastTxCount | 0x0008 | -| * PacketUnicastRxCount | 0x0009 | -| * PacketUnicastTxCount | 0x000A | -| * CurrentMaxRate | 0x000B | -| * OverrunCount | 0x000C | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Disconnection | 0x0000 | -| * AssociationFailure | 0x0001 | -| * ConnectionStatus | 0x0002 | -\*----------------------------------------------------------------------------*/ - /* - * Command ResetCounts + * Command StepColorTemperature */ -class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand +class ColorControlStepColorTemperature : public ClusterCommand { public: - WiFiNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-counts", credsIssuerConfig) + ColorControlStepColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("step-color-temperature", credsIssuerConfig) { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on endpoint %u", endpointIds.at(0)); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000036, 0x00000000, mRequest); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004C, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on Group %u", groupId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on Group %u", groupId); - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000036, 0x00000000, mRequest); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004C, mRequest); } private: - chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type mRequest; + chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster EthernetNetworkDiagnostics | 0x0037 | +| Cluster BallastConfiguration | 0x0301 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCounts | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * PHYRate | 0x0000 | -| * FullDuplex | 0x0001 | -| * PacketRxCount | 0x0002 | -| * PacketTxCount | 0x0003 | -| * TxErrCount | 0x0004 | -| * CollisionCount | 0x0005 | -| * OverrunCount | 0x0006 | -| * CarrierDetect | 0x0007 | -| * TimeSinceReset | 0x0008 | +| * PhysicalMinLevel | 0x0000 | +| * PhysicalMaxLevel | 0x0001 | +| * BallastStatus | 0x0002 | +| * MinLevel | 0x0010 | +| * MaxLevel | 0x0011 | +| * PowerOnLevel | 0x0012 | +| * PowerOnFadeTime | 0x0013 | +| * IntrinsicBallastFactor | 0x0014 | +| * BallastFactorAdjustment | 0x0015 | +| * LampQuality | 0x0020 | +| * LampType | 0x0030 | +| * LampManufacturer | 0x0031 | +| * LampRatedHours | 0x0032 | +| * LampBurnHours | 0x0033 | +| * LampAlarmMode | 0x0034 | +| * LampBurnHoursTripPoint | 0x0035 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6325,42 +6756,17 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command ResetCounts - */ -class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand -{ -public: - EthernetNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-counts", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000037, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000037, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ -| Cluster TimeSynchronization | 0x0038 | +| Cluster IlluminanceMeasurement | 0x0400 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * LightSensorType | 0x0004 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6371,26 +6777,15 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster BridgedDeviceBasic | 0x0039 | +| Cluster TemperatureMeasurement | 0x0402 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * NodeLabel | 0x0005 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * Reachable | 0x0011 | -| * UniqueID | 0x0012 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6398,47 +6793,23 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StartUp | 0x0000 | -| * ShutDown | 0x0001 | -| * Leave | 0x0002 | -| * ReachableChanged | 0x0003 | \*----------------------------------------------------------------------------*/ -class WriteBridgedDeviceBasicNodeLabel : public WriteAttribute -{ -public: - WriteBridgedDeviceBasicNodeLabel(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("NodeLabel", credsIssuerConfig) - { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBridgedDeviceBasicNodeLabel() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000039, 0x00000005, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000039, 0x00000005, mValue); - } - -private: - chip::CharSpan mValue; -}; - /*----------------------------------------------------------------------------*\ -| Cluster Switch | 0x003B | +| Cluster PressureMeasurement | 0x0403 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * NumberOfPositions | 0x0000 | -| * CurrentPosition | 0x0001 | -| * MultiPressMax | 0x0002 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * ScaledValue | 0x0010 | +| * MinScaledValue | 0x0011 | +| * MaxScaledValue | 0x0012 | +| * ScaledTolerance | 0x0013 | +| * Scale | 0x0014 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6446,27 +6817,18 @@ class WriteBridgedDeviceBasicNodeLabel : public WriteAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * SwitchLatched | 0x0000 | -| * InitialPress | 0x0001 | -| * LongPress | 0x0002 | -| * ShortRelease | 0x0003 | -| * LongRelease | 0x0004 | -| * MultiPressOngoing | 0x0005 | -| * MultiPressComplete | 0x0006 | \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster AdministratorCommissioning | 0x003C | +| Cluster FlowMeasurement | 0x0404 | |------------------------------------------------------------------------------| | Commands: | | -| * OpenCommissioningWindow | 0x00 | -| * OpenBasicCommissioningWindow | 0x01 | -| * RevokeCommissioning | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | -| * WindowStatus | 0x0000 | -| * AdminFabricIndex | 0x0001 | -| * AdminVendorId | 0x0002 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6476,122 +6838,119 @@ class WriteBridgedDeviceBasicNodeLabel : public WriteAttribute | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command OpenCommissioningWindow - */ -class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand -{ -public: - AdministratorCommissioningOpenCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("open-commissioning-window", credsIssuerConfig) - { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - AddArgument("PAKEVerifier", &mRequest.PAKEVerifier); - AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); - AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); - AddArgument("Salt", &mRequest.salt); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; -}; - -/* - * Command OpenBasicCommissioningWindow - */ -class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand -{ -public: - AdministratorCommissioningOpenBasicCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("open-basic-commissioning-window", credsIssuerConfig) - { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; -}; - -/* - * Command RevokeCommissioning - */ -class AdministratorCommissioningRevokeCommissioning : public ClusterCommand -{ -public: - AdministratorCommissioningRevokeCommissioning(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("revoke-commissioning", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %u", endpointIds.at(0)); +/*----------------------------------------------------------------------------*\ +| Cluster RelativeHumidityMeasurement | 0x0405 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003C, 0x00000002, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster OccupancySensing | 0x0406 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Occupancy | 0x0000 | +| * OccupancySensorType | 0x0001 | +| * OccupancySensorTypeBitmap | 0x0002 | +| * PirOccupiedToUnoccupiedDelay | 0x0010 | +| * PirUnoccupiedToOccupiedDelay | 0x0011 | +| * PirUnoccupiedToOccupiedThreshold | 0x0012 | +| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | +| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | +| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | +| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | +| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | +| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on Group %u", groupId); +/*----------------------------------------------------------------------------*\ +| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003C, 0x00000002, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster EthyleneConcentrationMeasurement | 0x040E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster OperationalCredentials | 0x003E | +| Cluster EthyleneOxideConcentrationMeasurement | 0x040F | |------------------------------------------------------------------------------| | Commands: | | -| * AttestationRequest | 0x00 | -| * CertificateChainRequest | 0x02 | -| * CSRRequest | 0x04 | -| * AddNOC | 0x06 | -| * UpdateNOC | 0x07 | -| * UpdateFabricLabel | 0x09 | -| * RemoveFabric | 0x0A | -| * AddTrustedRootCertificate | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * NOCs | 0x0000 | -| * Fabrics | 0x0001 | -| * SupportedFabrics | 0x0002 | -| * CommissionedFabrics | 0x0003 | -| * TrustedRootCertificates | 0x0004 | -| * CurrentFabricIndex | 0x0005 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6601,531 +6960,16 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command AttestationRequest - */ -class OperationalCredentialsAttestationRequest : public ClusterCommand -{ -public: - OperationalCredentialsAttestationRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("attestation-request", credsIssuerConfig) - { - AddArgument("AttestationNonce", &mRequest.attestationNonce); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; -}; - -/* - * Command CertificateChainRequest - */ -class OperationalCredentialsCertificateChainRequest : public ClusterCommand -{ -public: - OperationalCredentialsCertificateChainRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("certificate-chain-request", credsIssuerConfig) - { - AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; -}; - -/* - * Command CSRRequest - */ -class OperationalCredentialsCSRRequest : public ClusterCommand -{ -public: - OperationalCredentialsCSRRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("csrrequest", credsIssuerConfig) - { - AddArgument("CSRNonce", &mRequest.CSRNonce); - AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000004, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000004, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; -}; - -/* - * Command AddNOC - */ -class OperationalCredentialsAddNOC : public ClusterCommand -{ -public: - OperationalCredentialsAddNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-noc", credsIssuerConfig) - { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - AddArgument("IPKValue", &mRequest.IPKValue); - AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); - AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000006, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000006, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; -}; - -/* - * Command UpdateNOC - */ -class OperationalCredentialsUpdateNOC : public ClusterCommand -{ -public: - OperationalCredentialsUpdateNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("update-noc", credsIssuerConfig) - { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000007, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000007, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; -}; - -/* - * Command UpdateFabricLabel - */ -class OperationalCredentialsUpdateFabricLabel : public ClusterCommand -{ -public: - OperationalCredentialsUpdateFabricLabel(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("update-fabric-label", credsIssuerConfig) - { - AddArgument("Label", &mRequest.label); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x00000009, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x00000009, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; -}; - -/* - * Command RemoveFabric - */ -class OperationalCredentialsRemoveFabric : public ClusterCommand -{ -public: - OperationalCredentialsRemoveFabric(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("remove-fabric", credsIssuerConfig) - { - AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x0000000A, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x0000000A, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; -}; - -/* - * Command AddTrustedRootCertificate - */ -class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand -{ -public: - OperationalCredentialsAddTrustedRootCertificate(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-trusted-root-certificate", credsIssuerConfig) - { - AddArgument("RootCertificate", &mRequest.rootCertificate); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003E, 0x0000000B, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003E, 0x0000000B, mRequest); - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ -| Cluster GroupKeyManagement | 0x003F | -|------------------------------------------------------------------------------| -| Commands: | | -| * KeySetWrite | 0x00 | -| * KeySetRead | 0x01 | -| * KeySetRemove | 0x03 | -| * KeySetReadAllIndices | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GroupKeyMap | 0x0000 | -| * GroupTable | 0x0001 | -| * MaxGroupsPerFabric | 0x0002 | -| * MaxGroupKeysPerFabric | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command KeySetWrite - */ -class GroupKeyManagementKeySetWrite : public ClusterCommand -{ -public: - GroupKeyManagementKeySetWrite(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-write", credsIssuerConfig), mComplex_GroupKeySet(&mRequest.groupKeySet) - { - AddArgument("GroupKeySet", &mComplex_GroupKeySet); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; - TypedComplexArgument mComplex_GroupKeySet; -}; - -/* - * Command KeySetRead - */ -class GroupKeyManagementKeySetRead : public ClusterCommand -{ -public: - GroupKeyManagementKeySetRead(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("key-set-read", credsIssuerConfig) - { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; -}; - -/* - * Command KeySetRemove - */ -class GroupKeyManagementKeySetRemove : public ClusterCommand -{ -public: - GroupKeyManagementKeySetRemove(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-remove", credsIssuerConfig) - { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; -}; - -/* - * Command KeySetReadAllIndices - */ -class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand -{ -public: - GroupKeyManagementKeySetReadAllIndices(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-read-all-indices", credsIssuerConfig), mComplex_GroupKeySetIDs(&mRequest.groupKeySetIDs) - { - AddArgument("GroupKeySetIDs", &mComplex_GroupKeySetIDs); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000004, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000004, mRequest); - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; - TypedComplexArgument> mComplex_GroupKeySetIDs; -}; - -class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute -{ -public: - WriteGroupKeyManagementGroupKeyMap(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("GroupKeyMap", credsIssuerConfig), mComplex(&mValue) - { - AddArgument("attr-name", "group-key-map"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteGroupKeyManagementGroupKeyMap() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000003F, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000003F, 0x00000000, mValue); - } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster FixedLabel | 0x0040 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LabelList | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster UserLabel | 0x0041 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LabelList | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteUserLabelLabelList : public WriteAttribute -{ -public: - WriteUserLabelLabelList(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LabelList", credsIssuerConfig), mComplex(&mValue) - { - AddArgument("attr-name", "label-list"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteUserLabelLabelList() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000041, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000041, 0x00000000, mValue); - } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ProxyConfiguration | 0x0042 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ProxyDiscovery | 0x0043 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ProxyValid | 0x0044 | +| Cluster HydrogenConcentrationMeasurement | 0x0410 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -7136,10808 +6980,3005 @@ class WriteUserLabelLabelList : public WriteAttribute \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster BooleanState | 0x0045 | +| Cluster HydrogenSulphideConcentrationMeasurement | 0x0411 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * StateValue | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChange | 0x0000 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeToMode - */ -class ModeSelectChangeToMode : public ClusterCommand -{ -public: - ModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) - { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000050, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000050, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; -}; - -class WriteModeSelectStartUpMode : public WriteAttribute -{ -public: - WriteModeSelectStartUpMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("StartUpMode", credsIssuerConfig) - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteModeSelectStartUpMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000050, 0x00000004, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000050, 0x00000004, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteModeSelectOnMode : public WriteAttribute -{ -public: - WriteModeSelectOnMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("OnMode", credsIssuerConfig) - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteModeSelectOnMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000050, 0x00000005, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000050, 0x00000005, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ShadeConfiguration | 0x0100 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhysicalClosedLimit | 0x0000 | -| * MotorStepSize | 0x0001 | -| * Status | 0x0002 | -| * ClosedLimit | 0x0010 | -| * Mode | 0x0011 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteShadeConfigurationStatus : public WriteAttribute -{ -public: - WriteShadeConfigurationStatus(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Status", credsIssuerConfig) - { - AddArgument("attr-name", "status"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteShadeConfigurationStatus() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000100, 0x00000002, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000100, 0x00000002, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteShadeConfigurationClosedLimit : public WriteAttribute -{ -public: - WriteShadeConfigurationClosedLimit(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ClosedLimit", credsIssuerConfig) - { - AddArgument("attr-name", "closed-limit"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteShadeConfigurationClosedLimit() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000100, 0x00000010, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000100, 0x00000010, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteShadeConfigurationMode : public WriteAttribute -{ -public: - WriteShadeConfigurationMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Mode", credsIssuerConfig) - { - AddArgument("attr-name", "mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteShadeConfigurationMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000100, 0x00000011, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000100, 0x00000011, mValue); - } - -private: - uint8_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster DoorLock | 0x0101 | -|------------------------------------------------------------------------------| -| Commands: | | -| * LockDoor | 0x00 | -| * UnlockDoor | 0x01 | -| * UnlockWithTimeout | 0x03 | -| * SetWeekDaySchedule | 0x0B | -| * GetWeekDaySchedule | 0x0C | -| * ClearWeekDaySchedule | 0x0D | -| * SetYearDaySchedule | 0x0E | -| * GetYearDaySchedule | 0x0F | -| * ClearYearDaySchedule | 0x10 | -| * SetHolidaySchedule | 0x11 | -| * GetHolidaySchedule | 0x12 | -| * ClearHolidaySchedule | 0x13 | -| * SetUser | 0x1A | -| * GetUser | 0x1B | -| * ClearUser | 0x1D | -| * SetCredential | 0x22 | -| * GetCredentialStatus | 0x24 | -| * ClearCredential | 0x26 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LockState | 0x0000 | -| * LockType | 0x0001 | -| * ActuatorEnabled | 0x0002 | -| * DoorState | 0x0003 | -| * DoorOpenEvents | 0x0004 | -| * DoorClosedEvents | 0x0005 | -| * OpenPeriod | 0x0006 | -| * NumberOfTotalUsersSupported | 0x0011 | -| * NumberOfPINUsersSupported | 0x0012 | -| * NumberOfRFIDUsersSupported | 0x0013 | -| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | -| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | -| * NumberOfHolidaySchedulesSupported | 0x0016 | -| * MaxPINCodeLength | 0x0017 | -| * MinPINCodeLength | 0x0018 | -| * MaxRFIDCodeLength | 0x0019 | -| * MinRFIDCodeLength | 0x001A | -| * CredentialRulesSupport | 0x001B | -| * NumberOfCredentialsSupportedPerUser | 0x001C | -| * Language | 0x0021 | -| * LEDSettings | 0x0022 | -| * AutoRelockTime | 0x0023 | -| * SoundVolume | 0x0024 | -| * OperatingMode | 0x0025 | -| * SupportedOperatingModes | 0x0026 | -| * DefaultConfigurationRegister | 0x0027 | -| * EnableLocalProgramming | 0x0028 | -| * EnableOneTouchLocking | 0x0029 | -| * EnableInsideStatusLED | 0x002A | -| * EnablePrivacyModeButton | 0x002B | -| * LocalProgrammingFeatures | 0x002C | -| * WrongCodeEntryLimit | 0x0030 | -| * UserCodeTemporaryDisableTime | 0x0031 | -| * SendPINOverTheAir | 0x0032 | -| * RequirePINforRemoteOperation | 0x0033 | -| * ExpiringUserTimeout | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * DoorLockAlarm | 0x0000 | -| * DoorStateChange | 0x0001 | -| * LockOperation | 0x0002 | -| * LockOperationError | 0x0003 | -| * LockUserChange | 0x0004 | -\*----------------------------------------------------------------------------*/ - -/* - * Command LockDoor - */ -class DoorLockLockDoor : public ClusterCommand -{ -public: - DoorLockLockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("lock-door", credsIssuerConfig) - { - AddArgument("PinCode", &mRequest.pinCode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; -}; - -/* - * Command UnlockDoor - */ -class DoorLockUnlockDoor : public ClusterCommand -{ -public: - DoorLockUnlockDoor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("unlock-door", credsIssuerConfig) - { - AddArgument("PinCode", &mRequest.pinCode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; -}; - -/* - * Command UnlockWithTimeout - */ -class DoorLockUnlockWithTimeout : public ClusterCommand -{ -public: - DoorLockUnlockWithTimeout(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("unlock-with-timeout", credsIssuerConfig) - { - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); - AddArgument("PinCode", &mRequest.pinCode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; -}; - -/* - * Command SetWeekDaySchedule - */ -class DoorLockSetWeekDaySchedule : public ClusterCommand -{ -public: - DoorLockSetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-week-day-schedule", credsIssuerConfig) - { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); - AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); - AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); - AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); - AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000B, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000B, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; -}; - -/* - * Command GetWeekDaySchedule - */ -class DoorLockGetWeekDaySchedule : public ClusterCommand -{ -public: - DoorLockGetWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-week-day-schedule", credsIssuerConfig) - { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000C, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000C, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; -}; - -/* - * Command ClearWeekDaySchedule - */ -class DoorLockClearWeekDaySchedule : public ClusterCommand -{ -public: - DoorLockClearWeekDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-week-day-schedule", credsIssuerConfig) - { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000D, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000D, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; -}; - -/* - * Command SetYearDaySchedule - */ -class DoorLockSetYearDaySchedule : public ClusterCommand -{ -public: - DoorLockSetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-year-day-schedule", credsIssuerConfig) - { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000E, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000E, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; -}; - -/* - * Command GetYearDaySchedule - */ -class DoorLockGetYearDaySchedule : public ClusterCommand -{ -public: - DoorLockGetYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-year-day-schedule", credsIssuerConfig) - { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000000F, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000000F, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; -}; - -/* - * Command ClearYearDaySchedule - */ -class DoorLockClearYearDaySchedule : public ClusterCommand -{ -public: - DoorLockClearYearDaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-year-day-schedule", credsIssuerConfig) - { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000010, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000010, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; -}; - -/* - * Command SetHolidaySchedule - */ -class DoorLockSetHolidaySchedule : public ClusterCommand -{ -public: - DoorLockSetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-holiday-schedule", credsIssuerConfig) - { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000011, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000011, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; -}; - -/* - * Command GetHolidaySchedule - */ -class DoorLockGetHolidaySchedule : public ClusterCommand -{ -public: - DoorLockGetHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-holiday-schedule", credsIssuerConfig) - { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000012, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000012, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; -}; - -/* - * Command ClearHolidaySchedule - */ -class DoorLockClearHolidaySchedule : public ClusterCommand -{ -public: - DoorLockClearHolidaySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-holiday-schedule", credsIssuerConfig) - { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000013, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000013, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; -}; - -/* - * Command SetUser - */ -class DoorLockSetUser : public ClusterCommand -{ -public: - DoorLockSetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-user", credsIssuerConfig) - { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserName", &mRequest.userName); - AddArgument("UserUniqueId", 0, UINT32_MAX, &mRequest.userUniqueId); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001A, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001A, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; -}; - -/* - * Command GetUser - */ -class DoorLockGetUser : public ClusterCommand -{ -public: - DoorLockGetUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-user", credsIssuerConfig) - { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001B, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001B, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; -}; - -/* - * Command ClearUser - */ -class DoorLockClearUser : public ClusterCommand -{ -public: - DoorLockClearUser(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("clear-user", credsIssuerConfig) - { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000001D, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000001D, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; -}; - -/* - * Command SetCredential - */ -class DoorLockSetCredential : public ClusterCommand -{ -public: - DoorLockSetCredential(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) - { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("Credential", &mComplex_Credential); - AddArgument("CredentialData", &mRequest.credentialData); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000022, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000022, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; - TypedComplexArgument mComplex_Credential; -}; - -/* - * Command GetCredentialStatus - */ -class DoorLockGetCredentialStatus : public ClusterCommand -{ -public: - DoorLockGetCredentialStatus(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-credential-status", credsIssuerConfig), mComplex_Credential(&mRequest.credential) - { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000024, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000024, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; - TypedComplexArgument mComplex_Credential; -}; - -/* - * Command ClearCredential - */ -class DoorLockClearCredential : public ClusterCommand -{ -public: - DoorLockClearCredential(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-credential", credsIssuerConfig), mComplex_Credential(&mRequest.credential) - { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000026, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000026, mRequest); - } - -private: - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; - TypedComplexArgument> - mComplex_Credential; -}; - -class WriteDoorLockDoorOpenEvents : public WriteAttribute -{ -public: - WriteDoorLockDoorOpenEvents(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("DoorOpenEvents", credsIssuerConfig) - { - AddArgument("attr-name", "door-open-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockDoorOpenEvents() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000004, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000004, mValue); - } - -private: - uint32_t mValue; -}; - -class WriteDoorLockDoorClosedEvents : public WriteAttribute -{ -public: - WriteDoorLockDoorClosedEvents(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("DoorClosedEvents", credsIssuerConfig) - { - AddArgument("attr-name", "door-closed-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockDoorClosedEvents() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000005, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000005, mValue); - } - -private: - uint32_t mValue; -}; - -class WriteDoorLockOpenPeriod : public WriteAttribute -{ -public: - WriteDoorLockOpenPeriod(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("OpenPeriod", credsIssuerConfig) - { - AddArgument("attr-name", "open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockOpenPeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000006, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000006, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteDoorLockLanguage : public WriteAttribute -{ -public: - WriteDoorLockLanguage(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Language", credsIssuerConfig) - { - AddArgument("attr-name", "language"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLanguage() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000021, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000021, mValue); - } - -private: - chip::CharSpan mValue; -}; - -class WriteDoorLockLEDSettings : public WriteAttribute -{ -public: - WriteDoorLockLEDSettings(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("LEDSettings", credsIssuerConfig) - { - AddArgument("attr-name", "ledsettings"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLEDSettings() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000022, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000022, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDoorLockAutoRelockTime : public WriteAttribute -{ -public: - WriteDoorLockAutoRelockTime(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("AutoRelockTime", credsIssuerConfig) - { - AddArgument("attr-name", "auto-relock-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockAutoRelockTime() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000023, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000023, mValue); - } - -private: - uint32_t mValue; -}; - -class WriteDoorLockSoundVolume : public WriteAttribute -{ -public: - WriteDoorLockSoundVolume(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("SoundVolume", credsIssuerConfig) - { - AddArgument("attr-name", "sound-volume"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSoundVolume() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000024, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000024, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDoorLockOperatingMode : public WriteAttribute -{ -public: - WriteDoorLockOperatingMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("OperatingMode", credsIssuerConfig) - { - AddArgument("attr-name", "operating-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockOperatingMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000025, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000025, mValue); - } - -private: - chip::app::Clusters::DoorLock::DlOperatingMode mValue; -}; - -class WriteDoorLockEnableLocalProgramming : public WriteAttribute -{ -public: - WriteDoorLockEnableLocalProgramming(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("EnableLocalProgramming", credsIssuerConfig) - { - AddArgument("attr-name", "enable-local-programming"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableLocalProgramming() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000028, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000028, mValue); - } - -private: - bool mValue; -}; - -class WriteDoorLockEnableOneTouchLocking : public WriteAttribute -{ -public: - WriteDoorLockEnableOneTouchLocking(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("EnableOneTouchLocking", credsIssuerConfig) - { - AddArgument("attr-name", "enable-one-touch-locking"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableOneTouchLocking() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000029, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000029, mValue); - } - -private: - bool mValue; -}; - -class WriteDoorLockEnableInsideStatusLED : public WriteAttribute -{ -public: - WriteDoorLockEnableInsideStatusLED(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("EnableInsideStatusLED", credsIssuerConfig) - { - AddArgument("attr-name", "enable-inside-status-led"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableInsideStatusLED() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000002A, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000002A, mValue); - } - -private: - bool mValue; -}; - -class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute -{ -public: - WriteDoorLockEnablePrivacyModeButton(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("EnablePrivacyModeButton", credsIssuerConfig) - { - AddArgument("attr-name", "enable-privacy-mode-button"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnablePrivacyModeButton() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000002B, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000002B, mValue); - } - -private: - bool mValue; -}; - -class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute -{ -public: - WriteDoorLockLocalProgrammingFeatures(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LocalProgrammingFeatures", credsIssuerConfig) - { - AddArgument("attr-name", "local-programming-features"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLocalProgrammingFeatures() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x0000002C, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x0000002C, mValue); - } - -private: - chip::BitMask mValue; -}; - -class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute -{ -public: - WriteDoorLockWrongCodeEntryLimit(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("WrongCodeEntryLimit", credsIssuerConfig) - { - AddArgument("attr-name", "wrong-code-entry-limit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockWrongCodeEntryLimit() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000030, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000030, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute -{ -public: - WriteDoorLockUserCodeTemporaryDisableTime(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("UserCodeTemporaryDisableTime", credsIssuerConfig) - { - AddArgument("attr-name", "user-code-temporary-disable-time"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockUserCodeTemporaryDisableTime() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000031, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000031, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDoorLockSendPINOverTheAir : public WriteAttribute -{ -public: - WriteDoorLockSendPINOverTheAir(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("SendPINOverTheAir", credsIssuerConfig) - { - AddArgument("attr-name", "send-pinover-the-air"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSendPINOverTheAir() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000032, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000032, mValue); - } - -private: - bool mValue; -}; - -class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute -{ -public: - WriteDoorLockRequirePINforRemoteOperation(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RequirePINforRemoteOperation", credsIssuerConfig) - { - AddArgument("attr-name", "require-pinfor-remote-operation"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockRequirePINforRemoteOperation() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000033, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000033, mValue); - } - -private: - bool mValue; -}; - -class WriteDoorLockExpiringUserTimeout : public WriteAttribute -{ -public: - WriteDoorLockExpiringUserTimeout(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ExpiringUserTimeout", credsIssuerConfig) - { - AddArgument("attr-name", "expiring-user-timeout"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockExpiringUserTimeout() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000101, 0x00000035, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000101, 0x00000035, mValue); - } - -private: - uint16_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster WindowCovering | 0x0102 | -|------------------------------------------------------------------------------| -| Commands: | | -| * UpOrOpen | 0x00 | -| * DownOrClose | 0x01 | -| * StopMotion | 0x02 | -| * GoToLiftValue | 0x04 | -| * GoToLiftPercentage | 0x05 | -| * GoToTiltValue | 0x07 | -| * GoToTiltPercentage | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Type | 0x0000 | -| * PhysicalClosedLimitLift | 0x0001 | -| * PhysicalClosedLimitTilt | 0x0002 | -| * CurrentPositionLift | 0x0003 | -| * CurrentPositionTilt | 0x0004 | -| * NumberOfActuationsLift | 0x0005 | -| * NumberOfActuationsTilt | 0x0006 | -| * ConfigStatus | 0x0007 | -| * CurrentPositionLiftPercentage | 0x0008 | -| * CurrentPositionTiltPercentage | 0x0009 | -| * OperationalStatus | 0x000A | -| * TargetPositionLiftPercent100ths | 0x000B | -| * TargetPositionTiltPercent100ths | 0x000C | -| * EndProductType | 0x000D | -| * CurrentPositionLiftPercent100ths | 0x000E | -| * CurrentPositionTiltPercent100ths | 0x000F | -| * InstalledOpenLimitLift | 0x0010 | -| * InstalledClosedLimitLift | 0x0011 | -| * InstalledOpenLimitTilt | 0x0012 | -| * InstalledClosedLimitTilt | 0x0013 | -| * Mode | 0x0017 | -| * SafetyStatus | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command UpOrOpen - */ -class WindowCoveringUpOrOpen : public ClusterCommand -{ -public: - WindowCoveringUpOrOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("up-or-open", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type mRequest; -}; - -/* - * Command DownOrClose - */ -class WindowCoveringDownOrClose : public ClusterCommand -{ -public: - WindowCoveringDownOrClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("down-or-close", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type mRequest; -}; - -/* - * Command StopMotion - */ -class WindowCoveringStopMotion : public ClusterCommand -{ -public: - WindowCoveringStopMotion(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-motion", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type mRequest; -}; - -/* - * Command GoToLiftValue - */ -class WindowCoveringGoToLiftValue : public ClusterCommand -{ -public: - WindowCoveringGoToLiftValue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-lift-value", credsIssuerConfig) - { - AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000004, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000004, mRequest); - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; -}; - -/* - * Command GoToLiftPercentage - */ -class WindowCoveringGoToLiftPercentage : public ClusterCommand -{ -public: - WindowCoveringGoToLiftPercentage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-lift-percentage", credsIssuerConfig) - { - AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000005, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000005, mRequest); - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; -}; - -/* - * Command GoToTiltValue - */ -class WindowCoveringGoToTiltValue : public ClusterCommand -{ -public: - WindowCoveringGoToTiltValue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-tilt-value", credsIssuerConfig) - { - AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000007, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000007, mRequest); - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; -}; - -/* - * Command GoToTiltPercentage - */ -class WindowCoveringGoToTiltPercentage : public ClusterCommand -{ -public: - WindowCoveringGoToTiltPercentage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("go-to-tilt-percentage", credsIssuerConfig) - { - AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000008, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000008, mRequest); - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; -}; - -class WriteWindowCoveringMode : public WriteAttribute -{ -public: - WriteWindowCoveringMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Mode", credsIssuerConfig) - { - AddArgument("attr-name", "mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWindowCoveringMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000102, 0x00000017, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000102, 0x00000017, mValue); - } - -private: - chip::BitMask mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command BarrierControlGoToPercent - */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand -{ -public: - BarrierControlBarrierControlGoToPercent(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-go-to-percent", credsIssuerConfig) - { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; -}; - -/* - * Command BarrierControlStop - */ -class BarrierControlBarrierControlStop : public ClusterCommand -{ -public: - BarrierControlBarrierControlStop(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-stop", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type mRequest; -}; - -class WriteBarrierControlBarrierOpenEvents : public WriteAttribute -{ -public: - WriteBarrierControlBarrierOpenEvents(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BarrierOpenEvents", credsIssuerConfig) - { - AddArgument("attr-name", "barrier-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenEvents() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000004, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000004, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteBarrierControlBarrierCloseEvents : public WriteAttribute -{ -public: - WriteBarrierControlBarrierCloseEvents(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BarrierCloseEvents", credsIssuerConfig) - { - AddArgument("attr-name", "barrier-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCloseEvents() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000005, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000005, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute -{ -public: - WriteBarrierControlBarrierCommandOpenEvents(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BarrierCommandOpenEvents", credsIssuerConfig) - { - AddArgument("attr-name", "barrier-command-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandOpenEvents() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000006, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000006, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute -{ -public: - WriteBarrierControlBarrierCommandCloseEvents(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BarrierCommandCloseEvents", credsIssuerConfig) - { - AddArgument("attr-name", "barrier-command-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandCloseEvents() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000007, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000007, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute -{ -public: - WriteBarrierControlBarrierOpenPeriod(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BarrierOpenPeriod", credsIssuerConfig) - { - AddArgument("attr-name", "barrier-open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenPeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000008, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000008, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteBarrierControlBarrierClosePeriod : public WriteAttribute -{ -public: - WriteBarrierControlBarrierClosePeriod(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BarrierClosePeriod", credsIssuerConfig) - { - AddArgument("attr-name", "barrier-close-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierClosePeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000103, 0x00000009, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000103, 0x00000009, mValue); - } - -private: - uint16_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster PumpConfigurationAndControl | 0x0200 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxPressure | 0x0000 | -| * MaxSpeed | 0x0001 | -| * MaxFlow | 0x0002 | -| * MinConstPressure | 0x0003 | -| * MaxConstPressure | 0x0004 | -| * MinCompPressure | 0x0005 | -| * MaxCompPressure | 0x0006 | -| * MinConstSpeed | 0x0007 | -| * MaxConstSpeed | 0x0008 | -| * MinConstFlow | 0x0009 | -| * MaxConstFlow | 0x000A | -| * MinConstTemp | 0x000B | -| * MaxConstTemp | 0x000C | -| * PumpStatus | 0x0010 | -| * EffectiveOperationMode | 0x0011 | -| * EffectiveControlMode | 0x0012 | -| * Capacity | 0x0013 | -| * Speed | 0x0014 | -| * LifetimeRunningHours | 0x0015 | -| * Power | 0x0016 | -| * LifetimeEnergyConsumed | 0x0017 | -| * OperationMode | 0x0020 | -| * ControlMode | 0x0021 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SupplyVoltageLow | 0x0000 | -| * SupplyVoltageHigh | 0x0001 | -| * PowerMissingPhase | 0x0002 | -| * SystemPressureLow | 0x0003 | -| * SystemPressureHigh | 0x0004 | -| * DryRunning | 0x0005 | -| * MotorTemperatureHigh | 0x0006 | -| * PumpMotorFatalFailure | 0x0007 | -| * ElectronicTemperatureHigh | 0x0008 | -| * PumpBlocked | 0x0009 | -| * SensorFailure | 0x000A | -| * ElectronicNonFatalFailure | 0x000B | -| * ElectronicFatalFailure | 0x000C | -| * GeneralFault | 0x000D | -| * Leakage | 0x000E | -| * AirDetection | 0x000F | -| * TurbineOperation | 0x0010 | -\*----------------------------------------------------------------------------*/ - -class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute -{ -public: - WritePumpConfigurationAndControlLifetimeRunningHours(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LifetimeRunningHours", credsIssuerConfig) - { - AddArgument("attr-name", "lifetime-running-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlLifetimeRunningHours() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000200, 0x00000015, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000200, 0x00000015, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute -{ -public: - WritePumpConfigurationAndControlLifetimeEnergyConsumed(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LifetimeEnergyConsumed", credsIssuerConfig) - { - AddArgument("attr-name", "lifetime-energy-consumed"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000200, 0x00000017, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000200, 0x00000017, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WritePumpConfigurationAndControlOperationMode : public WriteAttribute -{ -public: - WritePumpConfigurationAndControlOperationMode(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OperationMode", credsIssuerConfig) - { - AddArgument("attr-name", "operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlOperationMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000200, 0x00000020, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000200, 0x00000020, mValue); - } - -private: - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode mValue; -}; - -class WritePumpConfigurationAndControlControlMode : public WriteAttribute -{ -public: - WritePumpConfigurationAndControlControlMode(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ControlMode", credsIssuerConfig) - { - AddArgument("attr-name", "control-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlControlMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000200, 0x00000021, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000200, 0x00000021, mValue); - } - -private: - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SetpointRaiseLower - */ -class ThermostatSetpointRaiseLower : public ClusterCommand -{ -public: - ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("setpoint-raise-lower", credsIssuerConfig) - { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; -}; - -/* - * Command SetWeeklySchedule - */ -class ThermostatSetWeeklySchedule : public ClusterCommand -{ -public: - ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) - { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex_Transitions; -}; - -/* - * Command GetWeeklySchedule - */ -class ThermostatGetWeeklySchedule : public ClusterCommand -{ -public: - ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-weekly-schedule", credsIssuerConfig) - { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; -}; - -/* - * Command ClearWeeklySchedule - */ -class ThermostatClearWeeklySchedule : public ClusterCommand -{ -public: - ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-weekly-schedule", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; -}; - -class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute -{ -public: - WriteThermostatHVACSystemTypeConfiguration(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("HVACSystemTypeConfiguration", credsIssuerConfig) - { - AddArgument("attr-name", "hvacsystem-type-configuration"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatHVACSystemTypeConfiguration() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000009, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000009, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatLocalTemperatureCalibration : public WriteAttribute -{ -public: - WriteThermostatLocalTemperatureCalibration(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LocalTemperatureCalibration", credsIssuerConfig) - { - AddArgument("attr-name", "local-temperature-calibration"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatLocalTemperatureCalibration() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000010, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000010, mValue); - } - -private: - int8_t mValue; -}; - -class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute -{ -public: - WriteThermostatOccupiedCoolingSetpoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OccupiedCoolingSetpoint", credsIssuerConfig) - { - AddArgument("attr-name", "occupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000011, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000011, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute -{ -public: - WriteThermostatOccupiedHeatingSetpoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OccupiedHeatingSetpoint", credsIssuerConfig) - { - AddArgument("attr-name", "occupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000012, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000012, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute -{ -public: - WriteThermostatUnoccupiedCoolingSetpoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("UnoccupiedCoolingSetpoint", credsIssuerConfig) - { - AddArgument("attr-name", "unoccupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000013, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000013, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute -{ -public: - WriteThermostatUnoccupiedHeatingSetpoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("UnoccupiedHeatingSetpoint", credsIssuerConfig) - { - AddArgument("attr-name", "unoccupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000014, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000014, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatMinHeatSetpointLimit : public WriteAttribute -{ -public: - WriteThermostatMinHeatSetpointLimit(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MinHeatSetpointLimit", credsIssuerConfig) - { - AddArgument("attr-name", "min-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000015, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000015, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute -{ -public: - WriteThermostatMaxHeatSetpointLimit(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MaxHeatSetpointLimit", credsIssuerConfig) - { - AddArgument("attr-name", "max-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMaxHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000016, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000016, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatMinCoolSetpointLimit : public WriteAttribute -{ -public: - WriteThermostatMinCoolSetpointLimit(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MinCoolSetpointLimit", credsIssuerConfig) - { - AddArgument("attr-name", "min-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000017, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000017, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute -{ -public: - WriteThermostatMaxCoolSetpointLimit(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MaxCoolSetpointLimit", credsIssuerConfig) - { - AddArgument("attr-name", "max-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMaxCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000018, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000018, mValue); - } - -private: - int16_t mValue; -}; - -class WriteThermostatMinSetpointDeadBand : public WriteAttribute -{ -public: - WriteThermostatMinSetpointDeadBand(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("MinSetpointDeadBand", credsIssuerConfig) - { - AddArgument("attr-name", "min-setpoint-dead-band"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinSetpointDeadBand() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000019, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000019, mValue); - } - -private: - int8_t mValue; -}; - -class WriteThermostatRemoteSensing : public WriteAttribute -{ -public: - WriteThermostatRemoteSensing(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("RemoteSensing", credsIssuerConfig) - { - AddArgument("attr-name", "remote-sensing"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatRemoteSensing() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x0000001A, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x0000001A, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatControlSequenceOfOperation : public WriteAttribute -{ -public: - WriteThermostatControlSequenceOfOperation(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ControlSequenceOfOperation", credsIssuerConfig) - { - AddArgument("attr-name", "control-sequence-of-operation"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatControlSequenceOfOperation() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x0000001B, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x0000001B, mValue); - } - -private: - chip::app::Clusters::Thermostat::ThermostatControlSequence mValue; -}; - -class WriteThermostatSystemMode : public WriteAttribute -{ -public: - WriteThermostatSystemMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("SystemMode", credsIssuerConfig) - { - AddArgument("attr-name", "system-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatSystemMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x0000001C, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x0000001C, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatTemperatureSetpointHold : public WriteAttribute -{ -public: - WriteThermostatTemperatureSetpointHold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("TemperatureSetpointHold", credsIssuerConfig) - { - AddArgument("attr-name", "temperature-setpoint-hold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatTemperatureSetpointHold() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000023, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000023, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute -{ -public: - WriteThermostatTemperatureSetpointHoldDuration(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("TemperatureSetpointHoldDuration", credsIssuerConfig) - { - AddArgument("attr-name", "temperature-setpoint-hold-duration"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatTemperatureSetpointHoldDuration() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000024, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000024, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute -{ -public: - WriteThermostatThermostatProgrammingOperationMode(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ThermostatProgrammingOperationMode", credsIssuerConfig) - { - AddArgument("attr-name", "thermostat-programming-operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatThermostatProgrammingOperationMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000025, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000025, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatOccupiedSetback : public WriteAttribute -{ -public: - WriteThermostatOccupiedSetback(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OccupiedSetback", credsIssuerConfig) - { - AddArgument("attr-name", "occupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedSetback() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000034, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000034, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteThermostatUnoccupiedSetback : public WriteAttribute -{ -public: - WriteThermostatUnoccupiedSetback(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("UnoccupiedSetback", credsIssuerConfig) - { - AddArgument("attr-name", "unoccupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedSetback() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000037, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000037, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteThermostatEmergencyHeatDelta : public WriteAttribute -{ -public: - WriteThermostatEmergencyHeatDelta(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("EmergencyHeatDelta", credsIssuerConfig) - { - AddArgument("attr-name", "emergency-heat-delta"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatEmergencyHeatDelta() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x0000003A, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x0000003A, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatACType : public WriteAttribute -{ -public: - WriteThermostatACType(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ACType", credsIssuerConfig) - { - AddArgument("attr-name", "actype"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACType() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000040, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000040, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatACCapacity : public WriteAttribute -{ -public: - WriteThermostatACCapacity(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ACCapacity", credsIssuerConfig) - { - AddArgument("attr-name", "accapacity"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacity() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000041, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000041, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteThermostatACRefrigerantType : public WriteAttribute -{ -public: - WriteThermostatACRefrigerantType(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ACRefrigerantType", credsIssuerConfig) - { - AddArgument("attr-name", "acrefrigerant-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACRefrigerantType() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000042, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000042, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatACCompressorType : public WriteAttribute -{ -public: - WriteThermostatACCompressorType(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ACCompressorType", credsIssuerConfig) - { - AddArgument("attr-name", "accompressor-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCompressorType() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000043, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000043, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatACErrorCode : public WriteAttribute -{ -public: - WriteThermostatACErrorCode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ACErrorCode", credsIssuerConfig) - { - AddArgument("attr-name", "acerror-code"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACErrorCode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000044, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000044, mValue); - } - -private: - uint32_t mValue; -}; - -class WriteThermostatACLouverPosition : public WriteAttribute -{ -public: - WriteThermostatACLouverPosition(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ACLouverPosition", credsIssuerConfig) - { - AddArgument("attr-name", "aclouver-position"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACLouverPosition() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000045, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000045, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatACCapacityformat : public WriteAttribute -{ -public: - WriteThermostatACCapacityformat(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ACCapacityformat", credsIssuerConfig) - { - AddArgument("attr-name", "accapacityformat"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacityformat() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000201, 0x00000047, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000201, 0x00000047, mValue); - } - -private: - uint8_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster FanControl | 0x0202 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * FanMode | 0x0000 | -| * FanModeSequence | 0x0001 | -| * PercentSetting | 0x0002 | -| * PercentCurrent | 0x0003 | -| * SpeedMax | 0x0004 | -| * SpeedSetting | 0x0005 | -| * SpeedCurrent | 0x0006 | -| * RockSupport | 0x0007 | -| * RockSetting | 0x0008 | -| * WindSupport | 0x0009 | -| * WindSetting | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteFanControlFanMode : public WriteAttribute -{ -public: - WriteFanControlFanMode(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("FanMode", credsIssuerConfig) - { - AddArgument("attr-name", "fan-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlFanMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000000, mValue); - } - -private: - chip::app::Clusters::FanControl::FanModeType mValue; -}; - -class WriteFanControlFanModeSequence : public WriteAttribute -{ -public: - WriteFanControlFanModeSequence(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("FanModeSequence", credsIssuerConfig) - { - AddArgument("attr-name", "fan-mode-sequence"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlFanModeSequence() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000001, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000001, mValue); - } - -private: - chip::app::Clusters::FanControl::FanModeSequenceType mValue; -}; - -class WriteFanControlPercentSetting : public WriteAttribute -{ -public: - WriteFanControlPercentSetting(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PercentSetting", credsIssuerConfig) - { - AddArgument("attr-name", "percent-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlPercentSetting() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000002, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000002, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteFanControlSpeedSetting : public WriteAttribute -{ -public: - WriteFanControlSpeedSetting(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("SpeedSetting", credsIssuerConfig) - { - AddArgument("attr-name", "speed-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlSpeedSetting() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000005, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000005, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteFanControlRockSetting : public WriteAttribute -{ -public: - WriteFanControlRockSetting(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("RockSetting", credsIssuerConfig) - { - AddArgument("attr-name", "rock-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlRockSetting() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000202, 0x00000008, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x00000008, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteFanControlWindSetting : public WriteAttribute -{ -public: - WriteFanControlWindSetting(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("WindSetting", credsIssuerConfig) - { - AddArgument("attr-name", "wind-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlWindSetting() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000202, 0x0000000A, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000202, 0x0000000A, mValue); - } - -private: - uint8_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster DehumidificationControl | 0x0203 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * RelativeHumidity | 0x0000 | -| * DehumidificationCooling | 0x0001 | -| * RhDehumidificationSetpoint | 0x0010 | -| * RelativeHumidityMode | 0x0011 | -| * DehumidificationLockout | 0x0012 | -| * DehumidificationHysteresis | 0x0013 | -| * DehumidificationMaxCool | 0x0014 | -| * RelativeHumidityDisplay | 0x0015 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteDehumidificationControlRhDehumidificationSetpoint : public WriteAttribute -{ -public: - WriteDehumidificationControlRhDehumidificationSetpoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RhDehumidificationSetpoint", credsIssuerConfig) - { - AddArgument("attr-name", "rh-dehumidification-setpoint"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDehumidificationControlRhDehumidificationSetpoint() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000203, 0x00000010, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000203, 0x00000010, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDehumidificationControlRelativeHumidityMode : public WriteAttribute -{ -public: - WriteDehumidificationControlRelativeHumidityMode(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RelativeHumidityMode", credsIssuerConfig) - { - AddArgument("attr-name", "relative-humidity-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDehumidificationControlRelativeHumidityMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000203, 0x00000011, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000203, 0x00000011, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDehumidificationControlDehumidificationLockout : public WriteAttribute -{ -public: - WriteDehumidificationControlDehumidificationLockout(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("DehumidificationLockout", credsIssuerConfig) - { - AddArgument("attr-name", "dehumidification-lockout"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDehumidificationControlDehumidificationLockout() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000203, 0x00000012, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000203, 0x00000012, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDehumidificationControlDehumidificationHysteresis : public WriteAttribute -{ -public: - WriteDehumidificationControlDehumidificationHysteresis(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("DehumidificationHysteresis", credsIssuerConfig) - { - AddArgument("attr-name", "dehumidification-hysteresis"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDehumidificationControlDehumidificationHysteresis() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000203, 0x00000013, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000203, 0x00000013, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDehumidificationControlDehumidificationMaxCool : public WriteAttribute -{ -public: - WriteDehumidificationControlDehumidificationMaxCool(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("DehumidificationMaxCool", credsIssuerConfig) - { - AddArgument("attr-name", "dehumidification-max-cool"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDehumidificationControlDehumidificationMaxCool() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000203, 0x00000014, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000203, 0x00000014, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteDehumidificationControlRelativeHumidityDisplay : public WriteAttribute -{ -public: - WriteDehumidificationControlRelativeHumidityDisplay(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RelativeHumidityDisplay", credsIssuerConfig) - { - AddArgument("attr-name", "relative-humidity-display"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDehumidificationControlRelativeHumidityDisplay() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000203, 0x00000015, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000203, 0x00000015, mValue); - } - -private: - uint8_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureDisplayMode | 0x0000 | -| * KeypadLockout | 0x0001 | -| * ScheduleProgrammingVisibility | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute -{ -public: - WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("TemperatureDisplayMode", credsIssuerConfig) - { - AddArgument("attr-name", "temperature-display-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000204, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000204, 0x00000000, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute -{ -public: - WriteThermostatUserInterfaceConfigurationKeypadLockout(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("KeypadLockout", credsIssuerConfig) - { - AddArgument("attr-name", "keypad-lockout"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationKeypadLockout() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000204, 0x00000001, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000204, 0x00000001, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute -{ -public: - WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ScheduleProgrammingVisibility", credsIssuerConfig) - { - AddArgument("attr-name", "schedule-programming-visibility"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000204, 0x00000002, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000204, 0x00000002, mValue); - } - -private: - uint8_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ColorControl | 0x0300 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MoveToHue | 0x00 | -| * MoveHue | 0x01 | -| * StepHue | 0x02 | -| * MoveToSaturation | 0x03 | -| * MoveSaturation | 0x04 | -| * StepSaturation | 0x05 | -| * MoveToHueAndSaturation | 0x06 | -| * MoveToColor | 0x07 | -| * MoveColor | 0x08 | -| * StepColor | 0x09 | -| * MoveToColorTemperature | 0x0A | -| * EnhancedMoveToHue | 0x40 | -| * EnhancedMoveHue | 0x41 | -| * EnhancedStepHue | 0x42 | -| * EnhancedMoveToHueAndSaturation | 0x43 | -| * ColorLoopSet | 0x44 | -| * StopMoveStep | 0x47 | -| * MoveColorTemperature | 0x4B | -| * StepColorTemperature | 0x4C | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentHue | 0x0000 | -| * CurrentSaturation | 0x0001 | -| * RemainingTime | 0x0002 | -| * CurrentX | 0x0003 | -| * CurrentY | 0x0004 | -| * DriftCompensation | 0x0005 | -| * CompensationText | 0x0006 | -| * ColorTemperature | 0x0007 | -| * ColorMode | 0x0008 | -| * Options | 0x000F | -| * NumberOfPrimaries | 0x0010 | -| * Primary1X | 0x0011 | -| * Primary1Y | 0x0012 | -| * Primary1Intensity | 0x0013 | -| * Primary2X | 0x0015 | -| * Primary2Y | 0x0016 | -| * Primary2Intensity | 0x0017 | -| * Primary3X | 0x0019 | -| * Primary3Y | 0x001A | -| * Primary3Intensity | 0x001B | -| * Primary4X | 0x0020 | -| * Primary4Y | 0x0021 | -| * Primary4Intensity | 0x0022 | -| * Primary5X | 0x0024 | -| * Primary5Y | 0x0025 | -| * Primary5Intensity | 0x0026 | -| * Primary6X | 0x0028 | -| * Primary6Y | 0x0029 | -| * Primary6Intensity | 0x002A | -| * WhitePointX | 0x0030 | -| * WhitePointY | 0x0031 | -| * ColorPointRX | 0x0032 | -| * ColorPointRY | 0x0033 | -| * ColorPointRIntensity | 0x0034 | -| * ColorPointGX | 0x0036 | -| * ColorPointGY | 0x0037 | -| * ColorPointGIntensity | 0x0038 | -| * ColorPointBX | 0x003A | -| * ColorPointBY | 0x003B | -| * ColorPointBIntensity | 0x003C | -| * EnhancedCurrentHue | 0x4000 | -| * EnhancedColorMode | 0x4001 | -| * ColorLoopActive | 0x4002 | -| * ColorLoopDirection | 0x4003 | -| * ColorLoopTime | 0x4004 | -| * ColorLoopStartEnhancedHue | 0x4005 | -| * ColorLoopStoredEnhancedHue | 0x4006 | -| * ColorCapabilities | 0x400A | -| * ColorTempPhysicalMinMireds | 0x400B | -| * ColorTempPhysicalMaxMireds | 0x400C | -| * CoupleColorTempToLevelMinMireds | 0x400D | -| * StartUpColorTemperatureMireds | 0x4010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command MoveToHue - */ -class ColorControlMoveToHue : public ClusterCommand -{ -public: - ColorControlMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-hue", credsIssuerConfig) - { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; -}; - -/* - * Command MoveHue - */ -class ColorControlMoveHue : public ClusterCommand -{ -public: - ColorControlMoveHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-hue", credsIssuerConfig) - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; -}; - -/* - * Command StepHue - */ -class ColorControlStepHue : public ClusterCommand -{ -public: - ColorControlStepHue(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-hue", credsIssuerConfig) - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; -}; - -/* - * Command MoveToSaturation - */ -class ColorControlMoveToSaturation : public ClusterCommand -{ -public: - ColorControlMoveToSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-saturation", credsIssuerConfig) - { - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; -}; - -/* - * Command MoveSaturation - */ -class ColorControlMoveSaturation : public ClusterCommand -{ -public: - ColorControlMoveSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-saturation", credsIssuerConfig) - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000004, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000004, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; -}; - -/* - * Command StepSaturation - */ -class ColorControlStepSaturation : public ClusterCommand -{ -public: - ColorControlStepSaturation(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-saturation", credsIssuerConfig) - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000005, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000005, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; -}; - -/* - * Command MoveToHueAndSaturation - */ -class ColorControlMoveToHueAndSaturation : public ClusterCommand -{ -public: - ColorControlMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-hue-and-saturation", credsIssuerConfig) - { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000006, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000006, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; -}; - -/* - * Command MoveToColor - */ -class ColorControlMoveToColor : public ClusterCommand -{ -public: - ColorControlMoveToColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-color", credsIssuerConfig) - { - AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); - AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000007, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000007, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; -}; - -/* - * Command MoveColor - */ -class ColorControlMoveColor : public ClusterCommand -{ -public: - ColorControlMoveColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-color", credsIssuerConfig) - { - AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); - AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000008, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000008, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; -}; - -/* - * Command StepColor - */ -class ColorControlStepColor : public ClusterCommand -{ -public: - ColorControlStepColor(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-color", credsIssuerConfig) - { - AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); - AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000009, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000009, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; -}; - -/* - * Command MoveToColorTemperature - */ -class ColorControlMoveToColorTemperature : public ClusterCommand -{ -public: - ColorControlMoveToColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-color-temperature", credsIssuerConfig) - { - AddArgument("ColorTemperature", 0, UINT16_MAX, &mRequest.colorTemperature); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000000A, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000000A, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; -}; - -/* - * Command EnhancedMoveToHue - */ -class ColorControlEnhancedMoveToHue : public ClusterCommand -{ -public: - ColorControlEnhancedMoveToHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-to-hue", credsIssuerConfig) - { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000040, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000040, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; -}; - -/* - * Command EnhancedMoveHue - */ -class ColorControlEnhancedMoveHue : public ClusterCommand -{ -public: - ColorControlEnhancedMoveHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-hue", credsIssuerConfig) - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000041, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000041, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; -}; - -/* - * Command EnhancedStepHue - */ -class ColorControlEnhancedStepHue : public ClusterCommand -{ -public: - ColorControlEnhancedStepHue(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-step-hue", credsIssuerConfig) - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000042, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000042, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; -}; - -/* - * Command EnhancedMoveToHueAndSaturation - */ -class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand -{ -public: - ColorControlEnhancedMoveToHueAndSaturation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-move-to-hue-and-saturation", credsIssuerConfig) - { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000043, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000043, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; -}; - -/* - * Command ColorLoopSet - */ -class ColorControlColorLoopSet : public ClusterCommand -{ -public: - ColorControlColorLoopSet(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("color-loop-set", credsIssuerConfig) - { - AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); - AddArgument("Action", 0, UINT8_MAX, &mRequest.action); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Time", 0, UINT16_MAX, &mRequest.time); - AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000044, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000044, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; -}; - -/* - * Command StopMoveStep - */ -class ColorControlStopMoveStep : public ClusterCommand -{ -public: - ColorControlStopMoveStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-move-step", credsIssuerConfig) - { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000047, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000047, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; -}; - -/* - * Command MoveColorTemperature - */ -class ColorControlMoveColorTemperature : public ClusterCommand -{ -public: - ColorControlMoveColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-color-temperature", credsIssuerConfig) - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004B, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004B, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; -}; - -/* - * Command StepColorTemperature - */ -class ColorControlStepColorTemperature : public ClusterCommand -{ -public: - ColorControlStepColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("step-color-temperature", credsIssuerConfig) - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000004C, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000004C, mRequest); - } - -private: - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; -}; - -class WriteColorControlOptions : public WriteAttribute -{ -public: - WriteColorControlOptions(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Options", credsIssuerConfig) - { - AddArgument("attr-name", "options"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlOptions() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000000F, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000000F, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteColorControlWhitePointX : public WriteAttribute -{ -public: - WriteColorControlWhitePointX(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("WhitePointX", credsIssuerConfig) - { - AddArgument("attr-name", "white-point-x"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlWhitePointX() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000030, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000030, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlWhitePointY : public WriteAttribute -{ -public: - WriteColorControlWhitePointY(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("WhitePointY", credsIssuerConfig) - { - AddArgument("attr-name", "white-point-y"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlWhitePointY() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000031, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000031, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlColorPointRX : public WriteAttribute -{ -public: - WriteColorControlColorPointRX(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ColorPointRX", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-rx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRX() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000032, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000032, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlColorPointRY : public WriteAttribute -{ -public: - WriteColorControlColorPointRY(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ColorPointRY", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-ry"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRY() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000033, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000033, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlColorPointRIntensity : public WriteAttribute -{ -public: - WriteColorControlColorPointRIntensity(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ColorPointRIntensity", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-rintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRIntensity() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000034, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000034, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteColorControlColorPointGX : public WriteAttribute -{ -public: - WriteColorControlColorPointGX(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ColorPointGX", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-gx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGX() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000036, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000036, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlColorPointGY : public WriteAttribute -{ -public: - WriteColorControlColorPointGY(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ColorPointGY", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-gy"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGY() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000037, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000037, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlColorPointGIntensity : public WriteAttribute -{ -public: - WriteColorControlColorPointGIntensity(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ColorPointGIntensity", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-gintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGIntensity() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00000038, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00000038, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteColorControlColorPointBX : public WriteAttribute -{ -public: - WriteColorControlColorPointBX(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ColorPointBX", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-bx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointBX() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000003A, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000003A, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlColorPointBY : public WriteAttribute -{ -public: - WriteColorControlColorPointBY(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("ColorPointBY", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-by"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointBY() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000003B, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000003B, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteColorControlColorPointBIntensity : public WriteAttribute -{ -public: - WriteColorControlColorPointBIntensity(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ColorPointBIntensity", credsIssuerConfig) - { - AddArgument("attr-name", "color-point-bintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointBIntensity() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x0000003C, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x0000003C, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute -{ -public: - WriteColorControlStartUpColorTemperatureMireds(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("StartUpColorTemperatureMireds", credsIssuerConfig) - { - AddArgument("attr-name", "start-up-color-temperature-mireds"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlStartUpColorTemperatureMireds() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000300, 0x00004010, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000300, 0x00004010, mValue); - } - -private: - uint16_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster BallastConfiguration | 0x0301 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhysicalMinLevel | 0x0000 | -| * PhysicalMaxLevel | 0x0001 | -| * BallastStatus | 0x0002 | -| * MinLevel | 0x0010 | -| * MaxLevel | 0x0011 | -| * PowerOnLevel | 0x0012 | -| * PowerOnFadeTime | 0x0013 | -| * IntrinsicBallastFactor | 0x0014 | -| * BallastFactorAdjustment | 0x0015 | -| * LampQuality | 0x0020 | -| * LampType | 0x0030 | -| * LampManufacturer | 0x0031 | -| * LampRatedHours | 0x0032 | -| * LampBurnHours | 0x0033 | -| * LampAlarmMode | 0x0034 | -| * LampBurnHoursTripPoint | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteBallastConfigurationMinLevel : public WriteAttribute -{ -public: - WriteBallastConfigurationMinLevel(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("MinLevel", credsIssuerConfig) - { - AddArgument("attr-name", "min-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMinLevel() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000010, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000010, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteBallastConfigurationMaxLevel : public WriteAttribute -{ -public: - WriteBallastConfigurationMaxLevel(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("MaxLevel", credsIssuerConfig) - { - AddArgument("attr-name", "max-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMaxLevel() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000011, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000011, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteBallastConfigurationPowerOnLevel : public WriteAttribute -{ -public: - WriteBallastConfigurationPowerOnLevel(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PowerOnLevel", credsIssuerConfig) - { - AddArgument("attr-name", "power-on-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationPowerOnLevel() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000012, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000012, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteBallastConfigurationPowerOnFadeTime : public WriteAttribute -{ -public: - WriteBallastConfigurationPowerOnFadeTime(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PowerOnFadeTime", credsIssuerConfig) - { - AddArgument("attr-name", "power-on-fade-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationPowerOnFadeTime() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000013, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000013, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute -{ -public: - WriteBallastConfigurationIntrinsicBallastFactor(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("IntrinsicBallastFactor", credsIssuerConfig) - { - AddArgument("attr-name", "intrinsic-ballast-factor"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationIntrinsicBallastFactor() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000014, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000014, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute -{ -public: - WriteBallastConfigurationBallastFactorAdjustment(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("BallastFactorAdjustment", credsIssuerConfig) - { - AddArgument("attr-name", "ballast-factor-adjustment"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationBallastFactorAdjustment() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000015, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000015, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteBallastConfigurationLampType : public WriteAttribute -{ -public: - WriteBallastConfigurationLampType(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("LampType", credsIssuerConfig) - { - AddArgument("attr-name", "lamp-type"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampType() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000030, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000030, mValue); - } - -private: - chip::CharSpan mValue; -}; - -class WriteBallastConfigurationLampManufacturer : public WriteAttribute -{ -public: - WriteBallastConfigurationLampManufacturer(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LampManufacturer", credsIssuerConfig) - { - AddArgument("attr-name", "lamp-manufacturer"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampManufacturer() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000031, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000031, mValue); - } - -private: - chip::CharSpan mValue; -}; - -class WriteBallastConfigurationLampRatedHours : public WriteAttribute -{ -public: - WriteBallastConfigurationLampRatedHours(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LampRatedHours", credsIssuerConfig) - { - AddArgument("attr-name", "lamp-rated-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampRatedHours() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000032, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000032, mValue); - } - -private: - uint32_t mValue; -}; - -class WriteBallastConfigurationLampBurnHours : public WriteAttribute -{ -public: - WriteBallastConfigurationLampBurnHours(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LampBurnHours", credsIssuerConfig) - { - AddArgument("attr-name", "lamp-burn-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHours() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000033, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000033, mValue); - } - -private: - uint32_t mValue; -}; - -class WriteBallastConfigurationLampAlarmMode : public WriteAttribute -{ -public: - WriteBallastConfigurationLampAlarmMode(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LampAlarmMode", credsIssuerConfig) - { - AddArgument("attr-name", "lamp-alarm-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampAlarmMode() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000034, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000034, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute -{ -public: - WriteBallastConfigurationLampBurnHoursTripPoint(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LampBurnHoursTripPoint", credsIssuerConfig) - { - AddArgument("attr-name", "lamp-burn-hours-trip-point"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHoursTripPoint() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000301, 0x00000035, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000301, 0x00000035, mValue); - } - -private: - uint32_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster IlluminanceMeasurement | 0x0400 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * LightSensorType | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster TemperatureMeasurement | 0x0402 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster PressureMeasurement | 0x0403 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * ScaledValue | 0x0010 | -| * MinScaledValue | 0x0011 | -| * MaxScaledValue | 0x0012 | -| * ScaledTolerance | 0x0013 | -| * Scale | 0x0014 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster FlowMeasurement | 0x0404 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster RelativeHumidityMeasurement | 0x0405 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster OccupancySensing | 0x0406 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Occupancy | 0x0000 | -| * OccupancySensorType | 0x0001 | -| * OccupancySensorTypeBitmap | 0x0002 | -| * PirOccupiedToUnoccupiedDelay | 0x0010 | -| * PirUnoccupiedToOccupiedDelay | 0x0011 | -| * PirUnoccupiedToOccupiedThreshold | 0x0012 | -| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | -| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | -| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | -| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | -| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | -| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteOccupancySensingPirOccupiedToUnoccupiedDelay : public WriteAttribute -{ -public: - WriteOccupancySensingPirOccupiedToUnoccupiedDelay(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PirOccupiedToUnoccupiedDelay", credsIssuerConfig) - { - AddArgument("attr-name", "pir-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPirOccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000010, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000010, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOccupancySensingPirUnoccupiedToOccupiedDelay : public WriteAttribute -{ -public: - WriteOccupancySensingPirUnoccupiedToOccupiedDelay(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PirUnoccupiedToOccupiedDelay", credsIssuerConfig) - { - AddArgument("attr-name", "pir-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPirUnoccupiedToOccupiedDelay() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000011, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000011, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOccupancySensingPirUnoccupiedToOccupiedThreshold : public WriteAttribute -{ -public: - WriteOccupancySensingPirUnoccupiedToOccupiedThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PirUnoccupiedToOccupiedThreshold", credsIssuerConfig) - { - AddArgument("attr-name", "pir-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPirUnoccupiedToOccupiedThreshold() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000012, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000012, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute -{ -public: - WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("UltrasonicOccupiedToUnoccupiedDelay", credsIssuerConfig) - { - AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000020, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000020, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute -{ -public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("UltrasonicUnoccupiedToOccupiedDelay", credsIssuerConfig) - { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000021, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000021, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute -{ -public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("UltrasonicUnoccupiedToOccupiedThreshold", credsIssuerConfig) - { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000022, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000022, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute -{ -public: - WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PhysicalContactOccupiedToUnoccupiedDelay", credsIssuerConfig) - { - AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000030, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000030, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute -{ -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PhysicalContactUnoccupiedToOccupiedDelay", credsIssuerConfig) - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000031, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000031, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute -{ -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("PhysicalContactUnoccupiedToOccupiedThreshold", credsIssuerConfig) - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000406, 0x00000032, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000406, 0x00000032, mValue); - } - -private: - uint8_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster EthyleneConcentrationMeasurement | 0x040E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster EthyleneOxideConcentrationMeasurement | 0x040F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster HydrogenConcentrationMeasurement | 0x0410 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster HydrogenSulphideConcentrationMeasurement | 0x0411 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster NitricOxideConcentrationMeasurement | 0x0412 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster OxygenConcentrationMeasurement | 0x0414 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster OzoneConcentrationMeasurement | 0x0415 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster SulfurDioxideConcentrationMeasurement | 0x0416 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster DissolvedOxygenConcentrationMeasurement | 0x0417 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster BromateConcentrationMeasurement | 0x0418 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ChloraminesConcentrationMeasurement | 0x0419 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ChlorineConcentrationMeasurement | 0x041A | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster FecalColiformAndEColiConcentrationMeasurement | 0x041B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster FluorideConcentrationMeasurement | 0x041C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster HaloaceticAcidsConcentrationMeasurement | 0x041D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster TotalTrihalomethanesConcentrationMeasurement | 0x041E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster TotalColiformBacteriaConcentrationMeasurement | 0x041F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster TurbidityConcentrationMeasurement | 0x0420 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster CopperConcentrationMeasurement | 0x0421 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster LeadConcentrationMeasurement | 0x0422 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ManganeseConcentrationMeasurement | 0x0423 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster SulfateConcentrationMeasurement | 0x0424 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster BromodichloromethaneConcentrationMeasurement | 0x0425 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster BromoformConcentrationMeasurement | 0x0426 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ChlorodibromomethaneConcentrationMeasurement | 0x0427 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ChloroformConcentrationMeasurement | 0x0428 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster SodiumConcentrationMeasurement | 0x0429 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster WakeOnLan | 0x0503 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MACAddress | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Channel | 0x0504 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeChannel | 0x00 | -| * ChangeChannelByNumber | 0x02 | -| * SkipChannel | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ChannelList | 0x0000 | -| * Lineup | 0x0001 | -| * CurrentChannel | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeChannel - */ -class ChannelChangeChannel : public ClusterCommand -{ -public: - ChannelChangeChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-channel", credsIssuerConfig) - { - AddArgument("Match", &mRequest.match); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; -}; - -/* - * Command ChangeChannelByNumber - */ -class ChannelChangeChannelByNumber : public ClusterCommand -{ -public: - ChannelChangeChannelByNumber(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("change-channel-by-number", credsIssuerConfig) - { - AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); - AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; -}; - -/* - * Command SkipChannel - */ -class ChannelSkipChannel : public ClusterCommand -{ -public: - ChannelSkipChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-channel", credsIssuerConfig) - { - AddArgument("Count", 0, UINT16_MAX, &mRequest.count); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::Channel::Commands::SkipChannel::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster TargetNavigator | 0x0505 | -|------------------------------------------------------------------------------| -| Commands: | | -| * NavigateTarget | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TargetList | 0x0000 | -| * CurrentTarget | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command NavigateTarget - */ -class TargetNavigatorNavigateTarget : public ClusterCommand -{ -public: - TargetNavigatorNavigateTarget(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("navigate-target", credsIssuerConfig) - { - AddArgument("Target", 0, UINT8_MAX, &mRequest.target); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000505, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000505, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster MediaPlayback | 0x0506 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Play | 0x00 | -| * Pause | 0x01 | -| * StopPlayback | 0x02 | -| * StartOver | 0x03 | -| * Previous | 0x04 | -| * Next | 0x05 | -| * Rewind | 0x06 | -| * FastForward | 0x07 | -| * SkipForward | 0x08 | -| * SkipBackward | 0x09 | -| * Seek | 0x0B | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentState | 0x0000 | -| * StartTime | 0x0001 | -| * Duration | 0x0002 | -| * SampledPosition | 0x0003 | -| * PlaybackSpeed | 0x0004 | -| * SeekRangeEnd | 0x0005 | -| * SeekRangeStart | 0x0006 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command Play - */ -class MediaPlaybackPlay : public ClusterCommand -{ -public: - MediaPlaybackPlay(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("play", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::Play::Type mRequest; -}; - -/* - * Command Pause - */ -class MediaPlaybackPause : public ClusterCommand -{ -public: - MediaPlaybackPause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::Pause::Type mRequest; -}; - -/* - * Command StopPlayback - */ -class MediaPlaybackStopPlayback : public ClusterCommand -{ -public: - MediaPlaybackStopPlayback(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-playback", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type mRequest; -}; - -/* - * Command StartOver - */ -class MediaPlaybackStartOver : public ClusterCommand -{ -public: - MediaPlaybackStartOver(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-over", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::StartOver::Type mRequest; -}; - -/* - * Command Previous - */ -class MediaPlaybackPrevious : public ClusterCommand -{ -public: - MediaPlaybackPrevious(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("previous", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000004, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000004, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::Previous::Type mRequest; -}; - -/* - * Command Next - */ -class MediaPlaybackNext : public ClusterCommand -{ -public: - MediaPlaybackNext(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("next", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000005, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000005, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::Next::Type mRequest; -}; - -/* - * Command Rewind - */ -class MediaPlaybackRewind : public ClusterCommand -{ -public: - MediaPlaybackRewind(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rewind", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000006, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000006, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type mRequest; -}; - -/* - * Command FastForward - */ -class MediaPlaybackFastForward : public ClusterCommand -{ -public: - MediaPlaybackFastForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fast-forward", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000007, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000007, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type mRequest; -}; - -/* - * Command SkipForward - */ -class MediaPlaybackSkipForward : public ClusterCommand -{ -public: - MediaPlaybackSkipForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-forward", credsIssuerConfig) - { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000008, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000008, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; -}; - -/* - * Command SkipBackward - */ -class MediaPlaybackSkipBackward : public ClusterCommand -{ -public: - MediaPlaybackSkipBackward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-backward", credsIssuerConfig) - { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000009, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000009, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; -}; - -/* - * Command Seek - */ -class MediaPlaybackSeek : public ClusterCommand -{ -public: - MediaPlaybackSeek(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("seek", credsIssuerConfig) - { - AddArgument("Position", 0, UINT64_MAX, &mRequest.position); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x0000000B, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x0000000B, mRequest); - } - -private: - chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster MediaInput | 0x0507 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelectInput | 0x00 | -| * ShowInputStatus | 0x01 | -| * HideInputStatus | 0x02 | -| * RenameInput | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * InputList | 0x0000 | -| * CurrentInput | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SelectInput - */ -class MediaInputSelectInput : public ClusterCommand -{ -public: - MediaInputSelectInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-input", credsIssuerConfig) - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::MediaInput::Commands::SelectInput::Type mRequest; -}; - -/* - * Command ShowInputStatus - */ -class MediaInputShowInputStatus : public ClusterCommand -{ -public: - MediaInputShowInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("show-input-status", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type mRequest; -}; - -/* - * Command HideInputStatus - */ -class MediaInputHideInputStatus : public ClusterCommand -{ -public: - MediaInputHideInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("hide-input-status", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type mRequest; -}; - -/* - * Command RenameInput - */ -class MediaInputRenameInput : public ClusterCommand -{ -public: - MediaInputRenameInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-input", credsIssuerConfig) - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster LowPower | 0x0508 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Sleep | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command Sleep - */ -class LowPowerSleep : public ClusterCommand -{ -public: - LowPowerSleep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("sleep", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000508, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000508, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::LowPower::Commands::Sleep::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster KeypadInput | 0x0509 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SendKey | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SendKey - */ -class KeypadInputSendKey : public ClusterCommand -{ -public: - KeypadInputSendKey(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("send-key", credsIssuerConfig) - { - AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000509, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000509, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ContentLauncher | 0x050A | -|------------------------------------------------------------------------------| -| Commands: | | -| * LaunchContent | 0x00 | -| * LaunchURL | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AcceptHeader | 0x0000 | -| * SupportedStreamingProtocols | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command LaunchContent - */ -class ContentLauncherLaunchContent : public ClusterCommand -{ -public: - ContentLauncherLaunchContent(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("launch-content", credsIssuerConfig), mComplex_Search(&mRequest.search) - { - AddArgument("Search", &mComplex_Search); - AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050A, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050A, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; - TypedComplexArgument mComplex_Search; -}; - -/* - * Command LaunchURL - */ -class ContentLauncherLaunchURL : public ClusterCommand -{ -public: - ContentLauncherLaunchURL(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("launch-url", credsIssuerConfig), mComplex_BrandingInformation(&mRequest.brandingInformation) - { - AddArgument("ContentURL", &mRequest.contentURL); - AddArgument("DisplayString", &mRequest.displayString); - AddArgument("BrandingInformation", &mComplex_BrandingInformation); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050A, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050A, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; - TypedComplexArgument> - mComplex_BrandingInformation; -}; - -class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute -{ -public: - WriteContentLauncherSupportedStreamingProtocols(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("SupportedStreamingProtocols", credsIssuerConfig) - { - AddArgument("attr-name", "supported-streaming-protocols"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteContentLauncherSupportedStreamingProtocols() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000050A, 0x00000001, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000050A, 0x00000001, mValue); - } - -private: - uint32_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster AudioOutput | 0x050B | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelectOutput | 0x00 | -| * RenameOutput | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * OutputList | 0x0000 | -| * CurrentOutput | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SelectOutput - */ -class AudioOutputSelectOutput : public ClusterCommand -{ -public: - AudioOutputSelectOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-output", credsIssuerConfig) - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050B, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050B, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type mRequest; -}; - -/* - * Command RenameOutput - */ -class AudioOutputRenameOutput : public ClusterCommand -{ -public: - AudioOutputRenameOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-output", credsIssuerConfig) - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050B, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050B, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ApplicationLauncher | 0x050C | -|------------------------------------------------------------------------------| -| Commands: | | -| * LaunchApp | 0x00 | -| * StopApp | 0x01 | -| * HideApp | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CatalogList | 0x0000 | -| * CurrentApp | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command LaunchApp - */ -class ApplicationLauncherLaunchApp : public ClusterCommand -{ -public: - ApplicationLauncherLaunchApp(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("launch-app", credsIssuerConfig), mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; - TypedComplexArgument mComplex_Application; -}; - -/* - * Command StopApp - */ -class ApplicationLauncherStopApp : public ClusterCommand -{ -public: - ApplicationLauncherStopApp(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("stop-app", credsIssuerConfig), mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; - TypedComplexArgument mComplex_Application; -}; - -/* - * Command HideApp - */ -class ApplicationLauncherHideApp : public ClusterCommand -{ -public: - ApplicationLauncherHideApp(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("hide-app", credsIssuerConfig), mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; - TypedComplexArgument mComplex_Application; -}; - -class WriteApplicationLauncherCurrentApp : public WriteAttribute -{ -public: - WriteApplicationLauncherCurrentApp(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("CurrentApp", credsIssuerConfig), mComplex(&mValue) - { - AddArgument("attr-name", "current-app"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteApplicationLauncherCurrentApp() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000001, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000001, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; - TypedComplexArgument> - mComplex; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ApplicationBasic | 0x050D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * VendorName | 0x0000 | -| * VendorID | 0x0001 | -| * ApplicationName | 0x0002 | -| * ProductID | 0x0003 | -| * Application | 0x0004 | -| * Status | 0x0005 | -| * ApplicationVersion | 0x0006 | -| * AllowedVendorList | 0x0007 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster AccountLogin | 0x050E | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetSetupPIN | 0x00 | -| * Login | 0x02 | -| * Logout | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command GetSetupPIN - */ -class AccountLoginGetSetupPIN : public ClusterCommand -{ -public: - AccountLoginGetSetupPIN(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-setup-pin", credsIssuerConfig) - { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; -}; - -/* - * Command Login - */ -class AccountLoginLogin : public ClusterCommand -{ -public: - AccountLoginLogin(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("login", credsIssuerConfig) - { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - AddArgument("SetupPIN", &mRequest.setupPIN); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; -}; - -/* - * Command Logout - */ -class AccountLoginLogout : public ClusterCommand -{ -public: - AccountLoginLogout(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("logout", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::AccountLogin::Commands::Logout::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster Messaging | 0x0703 | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetLastMessage | 0x00 | -| * MessageConfirmation | 0x01 | -| * GetMessageCancellation | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command GetLastMessage - */ -class MessagingGetLastMessage : public ClusterCommand -{ -public: - MessagingGetLastMessage(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-last-message", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000703, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000703, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::Messaging::Commands::GetLastMessage::Type mRequest; -}; - -/* - * Command MessageConfirmation - */ -class MessagingMessageConfirmation : public ClusterCommand -{ -public: - MessagingMessageConfirmation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("message-confirmation", credsIssuerConfig) - { - AddArgument("MessageId", 0, UINT32_MAX, &mRequest.messageId); - AddArgument("ConfirmationTime", 0, UINT32_MAX, &mRequest.confirmationTime); - AddArgument("MessageConfirmationControl", 0, UINT8_MAX, &mRequest.messageConfirmationControl); - AddArgument("MessageResponse", &mRequest.messageResponse); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000703, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000703, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::Messaging::Commands::MessageConfirmation::Type mRequest; -}; - -/* - * Command GetMessageCancellation - */ -class MessagingGetMessageCancellation : public ClusterCommand -{ -public: - MessagingGetMessageCancellation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-message-cancellation", credsIssuerConfig) - { - AddArgument("EarliestImplementationTime", 0, UINT32_MAX, &mRequest.earliestImplementationTime); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000703, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000703, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::Messaging::Commands::GetMessageCancellation::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ApplianceIdentification | 0x0B00 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BasicIdentification | 0x0000 | -| * CompanyName | 0x0010 | -| * CompanyId | 0x0011 | -| * BrandName | 0x0012 | -| * BrandId | 0x0013 | -| * Model | 0x0014 | -| * PartNumber | 0x0015 | -| * ProductRevision | 0x0016 | -| * SoftwareRevision | 0x0017 | -| * ProductTypeName | 0x0018 | -| * ProductTypeId | 0x0019 | -| * CecedSpecificationVersion | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster MeterIdentification | 0x0B01 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CompanyName | 0x0000 | -| * MeterTypeId | 0x0001 | -| * DataQualityId | 0x0004 | -| * CustomerName | 0x0005 | -| * Model | 0x0006 | -| * PartNumber | 0x0007 | -| * ProductRevision | 0x0008 | -| * SoftwareRevision | 0x000A | -| * UtilityName | 0x000B | -| * Pod | 0x000C | -| * AvailablePower | 0x000D | -| * PowerThreshold | 0x000E | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -class WriteMeterIdentificationCustomerName : public WriteAttribute -{ -public: - WriteMeterIdentificationCustomerName(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("CustomerName", credsIssuerConfig) - { - AddArgument("attr-name", "customer-name"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteMeterIdentificationCustomerName() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B01, 0x00000005, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B01, 0x00000005, mValue); - } - -private: - chip::CharSpan mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ApplianceEventsAndAlert | 0x0B02 | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetAlerts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command GetAlerts - */ -class ApplianceEventsAndAlertGetAlerts : public ClusterCommand -{ -public: - ApplianceEventsAndAlertGetAlerts(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-alerts", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B02) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B02, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B02) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B02, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ApplianceEventsAndAlert::Commands::GetAlerts::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ApplianceStatistics | 0x0B03 | -|------------------------------------------------------------------------------| -| Commands: | | -| * LogRequest | 0x00 | -| * LogQueueRequest | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LogMaxSize | 0x0000 | -| * LogQueueMaxSize | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command LogRequest - */ -class ApplianceStatisticsLogRequest : public ClusterCommand -{ -public: - ApplianceStatisticsLogRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("log-request", credsIssuerConfig) - { - AddArgument("LogId", 0, UINT32_MAX, &mRequest.logId); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B03, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B03, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ApplianceStatistics::Commands::LogRequest::Type mRequest; -}; - -/* - * Command LogQueueRequest - */ -class ApplianceStatisticsLogQueueRequest : public ClusterCommand -{ -public: - ApplianceStatisticsLogQueueRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("log-queue-request", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B03, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B03, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::ApplianceStatistics::Commands::LogQueueRequest::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ElectricalMeasurement | 0x0B04 | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetProfileInfoCommand | 0x00 | -| * GetMeasurementProfileCommand | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasurementType | 0x0000 | -| * DcVoltage | 0x0100 | -| * DcVoltageMin | 0x0101 | -| * DcVoltageMax | 0x0102 | -| * DcCurrent | 0x0103 | -| * DcCurrentMin | 0x0104 | -| * DcCurrentMax | 0x0105 | -| * DcPower | 0x0106 | -| * DcPowerMin | 0x0107 | -| * DcPowerMax | 0x0108 | -| * DcVoltageMultiplier | 0x0200 | -| * DcVoltageDivisor | 0x0201 | -| * DcCurrentMultiplier | 0x0202 | -| * DcCurrentDivisor | 0x0203 | -| * DcPowerMultiplier | 0x0204 | -| * DcPowerDivisor | 0x0205 | -| * AcFrequency | 0x0300 | -| * AcFrequencyMin | 0x0301 | -| * AcFrequencyMax | 0x0302 | -| * NeutralCurrent | 0x0303 | -| * TotalActivePower | 0x0304 | -| * TotalReactivePower | 0x0305 | -| * TotalApparentPower | 0x0306 | -| * Measured1stHarmonicCurrent | 0x0307 | -| * Measured3rdHarmonicCurrent | 0x0308 | -| * Measured5thHarmonicCurrent | 0x0309 | -| * Measured7thHarmonicCurrent | 0x030A | -| * Measured9thHarmonicCurrent | 0x030B | -| * Measured11thHarmonicCurrent | 0x030C | -| * MeasuredPhase1stHarmonicCurrent | 0x030D | -| * MeasuredPhase3rdHarmonicCurrent | 0x030E | -| * MeasuredPhase5thHarmonicCurrent | 0x030F | -| * MeasuredPhase7thHarmonicCurrent | 0x0310 | -| * MeasuredPhase9thHarmonicCurrent | 0x0311 | -| * MeasuredPhase11thHarmonicCurrent | 0x0312 | -| * AcFrequencyMultiplier | 0x0400 | -| * AcFrequencyDivisor | 0x0401 | -| * PowerMultiplier | 0x0402 | -| * PowerDivisor | 0x0403 | -| * HarmonicCurrentMultiplier | 0x0404 | -| * PhaseHarmonicCurrentMultiplier | 0x0405 | -| * InstantaneousVoltage | 0x0500 | -| * InstantaneousLineCurrent | 0x0501 | -| * InstantaneousActiveCurrent | 0x0502 | -| * InstantaneousReactiveCurrent | 0x0503 | -| * InstantaneousPower | 0x0504 | -| * RmsVoltage | 0x0505 | -| * RmsVoltageMin | 0x0506 | -| * RmsVoltageMax | 0x0507 | -| * RmsCurrent | 0x0508 | -| * RmsCurrentMin | 0x0509 | -| * RmsCurrentMax | 0x050A | -| * ActivePower | 0x050B | -| * ActivePowerMin | 0x050C | -| * ActivePowerMax | 0x050D | -| * ReactivePower | 0x050E | -| * ApparentPower | 0x050F | -| * PowerFactor | 0x0510 | -| * AverageRmsVoltageMeasurementPeriod | 0x0511 | -| * AverageRmsUnderVoltageCounter | 0x0513 | -| * RmsExtremeOverVoltagePeriod | 0x0514 | -| * RmsExtremeUnderVoltagePeriod | 0x0515 | -| * RmsVoltageSagPeriod | 0x0516 | -| * RmsVoltageSwellPeriod | 0x0517 | -| * AcVoltageMultiplier | 0x0600 | -| * AcVoltageDivisor | 0x0601 | -| * AcCurrentMultiplier | 0x0602 | -| * AcCurrentDivisor | 0x0603 | -| * AcPowerMultiplier | 0x0604 | -| * AcPowerDivisor | 0x0605 | -| * OverloadAlarmsMask | 0x0700 | -| * VoltageOverload | 0x0701 | -| * CurrentOverload | 0x0702 | -| * AcOverloadAlarmsMask | 0x0800 | -| * AcVoltageOverload | 0x0801 | -| * AcCurrentOverload | 0x0802 | -| * AcActivePowerOverload | 0x0803 | -| * AcReactivePowerOverload | 0x0804 | -| * AverageRmsOverVoltage | 0x0805 | -| * AverageRmsUnderVoltage | 0x0806 | -| * RmsExtremeOverVoltage | 0x0807 | -| * RmsExtremeUnderVoltage | 0x0808 | -| * RmsVoltageSag | 0x0809 | -| * RmsVoltageSwell | 0x080A | -| * LineCurrentPhaseB | 0x0901 | -| * ActiveCurrentPhaseB | 0x0902 | -| * ReactiveCurrentPhaseB | 0x0903 | -| * RmsVoltagePhaseB | 0x0905 | -| * RmsVoltageMinPhaseB | 0x0906 | -| * RmsVoltageMaxPhaseB | 0x0907 | -| * RmsCurrentPhaseB | 0x0908 | -| * RmsCurrentMinPhaseB | 0x0909 | -| * RmsCurrentMaxPhaseB | 0x090A | -| * ActivePowerPhaseB | 0x090B | -| * ActivePowerMinPhaseB | 0x090C | -| * ActivePowerMaxPhaseB | 0x090D | -| * ReactivePowerPhaseB | 0x090E | -| * ApparentPowerPhaseB | 0x090F | -| * PowerFactorPhaseB | 0x0910 | -| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | -| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | -| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | -| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | -| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | -| * RmsVoltageSagPeriodPhaseB | 0x0916 | -| * RmsVoltageSwellPeriodPhaseB | 0x0917 | -| * LineCurrentPhaseC | 0x0A01 | -| * ActiveCurrentPhaseC | 0x0A02 | -| * ReactiveCurrentPhaseC | 0x0A03 | -| * RmsVoltagePhaseC | 0x0A05 | -| * RmsVoltageMinPhaseC | 0x0A06 | -| * RmsVoltageMaxPhaseC | 0x0A07 | -| * RmsCurrentPhaseC | 0x0A08 | -| * RmsCurrentMinPhaseC | 0x0A09 | -| * RmsCurrentMaxPhaseC | 0x0A0A | -| * ActivePowerPhaseC | 0x0A0B | -| * ActivePowerMinPhaseC | 0x0A0C | -| * ActivePowerMaxPhaseC | 0x0A0D | -| * ReactivePowerPhaseC | 0x0A0E | -| * ApparentPowerPhaseC | 0x0A0F | -| * PowerFactorPhaseC | 0x0A10 | -| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | -| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | -| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | -| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | -| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | -| * RmsVoltageSagPeriodPhaseC | 0x0A16 | -| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command GetProfileInfoCommand - */ -class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand -{ -public: - ElectricalMeasurementGetProfileInfoCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-profile-info-command", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type mRequest; -}; - -/* - * Command GetMeasurementProfileCommand - */ -class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand -{ -public: - ElectricalMeasurementGetMeasurementProfileCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-measurement-profile-command", credsIssuerConfig) - { - AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); - AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); - AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; -}; - -class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public WriteAttribute -{ -public: - WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("AverageRmsVoltageMeasurementPeriod", credsIssuerConfig) - { - AddArgument("attr-name", "average-rms-voltage-measurement-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000511, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000511, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttribute -{ -public: - WriteElectricalMeasurementAverageRmsUnderVoltageCounter(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("AverageRmsUnderVoltageCounter", credsIssuerConfig) - { - AddArgument("attr-name", "average-rms-under-voltage-counter"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementAverageRmsUnderVoltageCounter() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000513, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000513, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttribute -{ -public: - WriteElectricalMeasurementRmsExtremeOverVoltagePeriod(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RmsExtremeOverVoltagePeriod", credsIssuerConfig) - { - AddArgument("attr-name", "rms-extreme-over-voltage-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsExtremeOverVoltagePeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000514, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000514, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttribute -{ -public: - WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RmsExtremeUnderVoltagePeriod", credsIssuerConfig) - { - AddArgument("attr-name", "rms-extreme-under-voltage-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000515, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000515, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute -{ -public: - WriteElectricalMeasurementRmsVoltageSagPeriod(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RmsVoltageSagPeriod", credsIssuerConfig) - { - AddArgument("attr-name", "rms-voltage-sag-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsVoltageSagPeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000516, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000516, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute -{ -public: - WriteElectricalMeasurementRmsVoltageSwellPeriod(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RmsVoltageSwellPeriod", credsIssuerConfig) - { - AddArgument("attr-name", "rms-voltage-swell-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsVoltageSwellPeriod() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000517, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000517, mValue); - } - -private: - uint16_t mValue; -}; - -class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute -{ -public: - WriteElectricalMeasurementOverloadAlarmsMask(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("OverloadAlarmsMask", credsIssuerConfig) - { - AddArgument("attr-name", "overload-alarms-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementOverloadAlarmsMask() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000700, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000700, mValue); - } - -private: - uint8_t mValue; -}; - -class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute -{ -public: - WriteElectricalMeasurementAcOverloadAlarmsMask(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("AcOverloadAlarmsMask", credsIssuerConfig) - { - AddArgument("attr-name", "ac-overload-alarms-mask"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementAcOverloadAlarmsMask() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000800, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000800, mValue); - } - -private: - uint16_t mValue; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster TestCluster | 0xFFF1FC05| -|------------------------------------------------------------------------------| -| Commands: | | -| * Test | 0x00 | -| * TestNotHandled | 0x01 | -| * TestSpecific | 0x02 | -| * TestUnknownCommand | 0x03 | -| * TestAddArguments | 0x04 | -| * TestSimpleArgumentRequest | 0x05 | -| * TestStructArrayArgumentRequest | 0x06 | -| * TestStructArgumentRequest | 0x07 | -| * TestNestedStructArgumentRequest | 0x08 | -| * TestListStructArgumentRequest | 0x09 | -| * TestListInt8UArgumentRequest | 0x0A | -| * TestNestedStructListArgumentRequest | 0x0B | -| * TestListNestedStructListArgumentRequest | 0x0C | -| * TestListInt8UReverseRequest | 0x0D | -| * TestEnumsRequest | 0x0E | -| * TestNullableOptionalRequest | 0x0F | -| * TestComplexNullableOptionalRequest | 0x10 | -| * SimpleStructEchoRequest | 0x11 | -| * TimedInvokeRequest | 0x12 | -| * TestSimpleOptionalArgumentRequest | 0x13 | -| * TestEmitTestEventRequest | 0x14 | -| * TestEmitTestFabricScopedEventRequest | 0x15 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Boolean | 0x0000 | -| * Bitmap8 | 0x0001 | -| * Bitmap16 | 0x0002 | -| * Bitmap32 | 0x0003 | -| * Bitmap64 | 0x0004 | -| * Int8u | 0x0005 | -| * Int16u | 0x0006 | -| * Int24u | 0x0007 | -| * Int32u | 0x0008 | -| * Int40u | 0x0009 | -| * Int48u | 0x000A | -| * Int56u | 0x000B | -| * Int64u | 0x000C | -| * Int8s | 0x000D | -| * Int16s | 0x000E | -| * Int24s | 0x000F | -| * Int32s | 0x0010 | -| * Int40s | 0x0011 | -| * Int48s | 0x0012 | -| * Int56s | 0x0013 | -| * Int64s | 0x0014 | -| * Enum8 | 0x0015 | -| * Enum16 | 0x0016 | -| * FloatSingle | 0x0017 | -| * FloatDouble | 0x0018 | -| * OctetString | 0x0019 | -| * ListInt8u | 0x001A | -| * ListOctetString | 0x001B | -| * ListStructOctetString | 0x001C | -| * LongOctetString | 0x001D | -| * CharString | 0x001E | -| * LongCharString | 0x001F | -| * EpochUs | 0x0020 | -| * EpochS | 0x0021 | -| * VendorId | 0x0022 | -| * ListNullablesAndOptionalsStruct | 0x0023 | -| * EnumAttr | 0x0024 | -| * StructAttr | 0x0025 | -| * RangeRestrictedInt8u | 0x0026 | -| * RangeRestrictedInt8s | 0x0027 | -| * RangeRestrictedInt16u | 0x0028 | -| * RangeRestrictedInt16s | 0x0029 | -| * ListLongOctetString | 0x002A | -| * ListFabricScoped | 0x002B | -| * TimedWriteBoolean | 0x0030 | -| * GeneralErrorBoolean | 0x0031 | -| * ClusterErrorBoolean | 0x0032 | -| * Unsupported | 0x00FF | -| * NullableBoolean | 0x4000 | -| * NullableBitmap8 | 0x4001 | -| * NullableBitmap16 | 0x4002 | -| * NullableBitmap32 | 0x4003 | -| * NullableBitmap64 | 0x4004 | -| * NullableInt8u | 0x4005 | -| * NullableInt16u | 0x4006 | -| * NullableInt24u | 0x4007 | -| * NullableInt32u | 0x4008 | -| * NullableInt40u | 0x4009 | -| * NullableInt48u | 0x400A | -| * NullableInt56u | 0x400B | -| * NullableInt64u | 0x400C | -| * NullableInt8s | 0x400D | -| * NullableInt16s | 0x400E | -| * NullableInt24s | 0x400F | -| * NullableInt32s | 0x4010 | -| * NullableInt40s | 0x4011 | -| * NullableInt48s | 0x4012 | -| * NullableInt56s | 0x4013 | -| * NullableInt64s | 0x4014 | -| * NullableEnum8 | 0x4015 | -| * NullableEnum16 | 0x4016 | -| * NullableFloatSingle | 0x4017 | -| * NullableFloatDouble | 0x4018 | -| * NullableOctetString | 0x4019 | -| * NullableCharString | 0x401E | -| * NullableEnumAttr | 0x4024 | -| * NullableStruct | 0x4025 | -| * NullableRangeRestrictedInt8u | 0x4026 | -| * NullableRangeRestrictedInt8s | 0x4027 | -| * NullableRangeRestrictedInt16u | 0x4028 | -| * NullableRangeRestrictedInt16s | 0x4029 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * TestEvent | 0x0001 | -| * TestFabricScopedEvent | 0x0002 | -\*----------------------------------------------------------------------------*/ - -/* - * Command Test - */ -class TestClusterTest : public ClusterCommand -{ -public: - TestClusterTest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000000, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000000, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::Test::Type mRequest; -}; - -/* - * Command TestNotHandled - */ -class TestClusterTestNotHandled : public ClusterCommand -{ -public: - TestClusterTestNotHandled(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-not-handled", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000001, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000001, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type mRequest; -}; - -/* - * Command TestSpecific - */ -class TestClusterTestSpecific : public ClusterCommand -{ -public: - TestClusterTestSpecific(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-specific", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000002, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000002, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestSpecific::Type mRequest; -}; - -/* - * Command TestUnknownCommand - */ -class TestClusterTestUnknownCommand : public ClusterCommand -{ -public: - TestClusterTestUnknownCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-unknown-command", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000003, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000003, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type mRequest; -}; - -/* - * Command TestAddArguments - */ -class TestClusterTestAddArguments : public ClusterCommand -{ -public: - TestClusterTestAddArguments(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-add-arguments", credsIssuerConfig) - { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); - AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000004, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000004, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type mRequest; -}; - -/* - * Command TestSimpleArgumentRequest - */ -class TestClusterTestSimpleArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestSimpleArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-simple-argument-request", credsIssuerConfig) - { - AddArgument("Arg1", 0, 1, &mRequest.arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000005, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000005, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentRequest::Type mRequest; -}; - -/* - * Command TestStructArrayArgumentRequest - */ -class TestClusterTestStructArrayArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestStructArrayArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-struct-array-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1), - mComplex_Arg2(&mRequest.arg2), mComplex_Arg3(&mRequest.arg3), mComplex_Arg4(&mRequest.arg4) - { - AddArgument("Arg1", &mComplex_Arg1); - AddArgument("Arg2", &mComplex_Arg2); - AddArgument("Arg3", &mComplex_Arg3); - AddArgument("Arg4", &mComplex_Arg4); - AddArgument("Arg5", 0, UINT8_MAX, &mRequest.arg5); - AddArgument("Arg6", 0, 1, &mRequest.arg6); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000006, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000006, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentRequest::Type mRequest; - TypedComplexArgument> - mComplex_Arg1; - TypedComplexArgument> - mComplex_Arg2; - TypedComplexArgument> mComplex_Arg3; - TypedComplexArgument> mComplex_Arg4; -}; - -/* - * Command TestStructArgumentRequest - */ -class TestClusterTestStructArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000007, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000007, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; -}; - -/* - * Command TestNestedStructArgumentRequest - */ -class TestClusterTestNestedStructArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestNestedStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-nested-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000008, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000008, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; -}; - -/* - * Command TestListStructArgumentRequest - */ -class TestClusterTestListStructArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestListStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000009, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000009, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type mRequest; - TypedComplexArgument> - mComplex_Arg1; -}; - -/* - * Command TestListInt8UArgumentRequest - */ -class TestClusterTestListInt8UArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestListInt8UArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-int8uargument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000A, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000A, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type mRequest; - TypedComplexArgument> mComplex_Arg1; -}; - -/* - * Command TestNestedStructListArgumentRequest - */ -class TestClusterTestNestedStructListArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000B, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000B, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; -}; - -/* - * Command TestListNestedStructListArgumentRequest - */ -class TestClusterTestListNestedStructListArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestListNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000C, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000C, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type mRequest; - TypedComplexArgument> - mComplex_Arg1; -}; - -/* - * Command TestListInt8UReverseRequest - */ -class TestClusterTestListInt8UReverseRequest : public ClusterCommand -{ -public: - TestClusterTestListInt8UReverseRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-list-int8ureverse-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000D, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000D, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type mRequest; - TypedComplexArgument> mComplex_Arg1; -}; - -/* - * Command TestEnumsRequest - */ -class TestClusterTestEnumsRequest : public ClusterCommand -{ -public: - TestClusterTestEnumsRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-enums-request", credsIssuerConfig) - { - AddArgument("Arg1", 0, UINT16_MAX, &mRequest.arg1); - AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000E, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000E, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type mRequest; -}; - -/* - * Command TestNullableOptionalRequest - */ -class TestClusterTestNullableOptionalRequest : public ClusterCommand -{ -public: - TestClusterTestNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-nullable-optional-request", credsIssuerConfig) - { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000F, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000F, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type mRequest; -}; - -/* - * Command TestComplexNullableOptionalRequest - */ -class TestClusterTestComplexNullableOptionalRequest : public ClusterCommand -{ -public: - TestClusterTestComplexNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-complex-nullable-optional-request", credsIssuerConfig), - mComplex_NullableStruct(&mRequest.nullableStruct), mComplex_OptionalStruct(&mRequest.optionalStruct), - mComplex_NullableOptionalStruct(&mRequest.nullableOptionalStruct), mComplex_NullableList(&mRequest.nullableList), - mComplex_OptionalList(&mRequest.optionalList), mComplex_NullableOptionalList(&mRequest.nullableOptionalList) - { - AddArgument("NullableInt", 0, UINT16_MAX, &mRequest.nullableInt); - AddArgument("OptionalInt", 0, UINT16_MAX, &mRequest.optionalInt); - AddArgument("NullableOptionalInt", 0, UINT16_MAX, &mRequest.nullableOptionalInt); - AddArgument("NullableString", &mRequest.nullableString); - AddArgument("OptionalString", &mRequest.optionalString); - AddArgument("NullableOptionalString", &mRequest.nullableOptionalString); - AddArgument("NullableStruct", &mComplex_NullableStruct); - AddArgument("OptionalStruct", &mComplex_OptionalStruct); - AddArgument("NullableOptionalStruct", &mComplex_NullableOptionalStruct); - AddArgument("NullableList", &mComplex_NullableList); - AddArgument("OptionalList", &mComplex_OptionalList); - AddArgument("NullableOptionalList", &mComplex_NullableOptionalList); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000010, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000010, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalRequest::Type mRequest; - TypedComplexArgument> - mComplex_NullableStruct; - TypedComplexArgument> mComplex_OptionalStruct; - TypedComplexArgument< - chip::Optional>> - mComplex_NullableOptionalStruct; - TypedComplexArgument< - chip::app::DataModel::Nullable>> - mComplex_NullableList; - TypedComplexArgument>> - mComplex_OptionalList; - TypedComplexArgument>>> - mComplex_NullableOptionalList; -}; - -/* - * Command SimpleStructEchoRequest - */ -class TestClusterSimpleStructEchoRequest : public ClusterCommand -{ -public: - TestClusterSimpleStructEchoRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("simple-struct-echo-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) - { - AddArgument("Arg1", &mComplex_Arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000011, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000011, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type mRequest; - TypedComplexArgument mComplex_Arg1; -}; - -/* - * Command TimedInvokeRequest - */ -class TestClusterTimedInvokeRequest : public ClusterCommand -{ -public: - TestClusterTimedInvokeRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("timed-invoke-request", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000012, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000012, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type mRequest; -}; - -/* - * Command TestSimpleOptionalArgumentRequest - */ -class TestClusterTestSimpleOptionalArgumentRequest : public ClusterCommand -{ -public: - TestClusterTestSimpleOptionalArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-simple-optional-argument-request", credsIssuerConfig) - { - AddArgument("Arg1", 0, 1, &mRequest.arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000013, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000013, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type mRequest; -}; - -/* - * Command TestEmitTestEventRequest - */ -class TestClusterTestEmitTestEventRequest : public ClusterCommand -{ -public: - TestClusterTestEmitTestEventRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-emit-test-event-request", credsIssuerConfig) - { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); - AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); - AddArgument("Arg3", 0, 1, &mRequest.arg3); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000014, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000014, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type mRequest; -}; - -/* - * Command TestEmitTestFabricScopedEventRequest - */ -class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand -{ -public: - TestClusterTestEmitTestFabricScopedEventRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("test-emit-test-fabric-scoped-event-request", credsIssuerConfig) - { - AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on endpoint %u", endpointIds.at(0)); - - return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000015, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on Group %u", groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000015, mRequest); - } - -private: - chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest; -}; - -class WriteTestClusterBoolean : public WriteAttribute -{ -public: - WriteTestClusterBoolean(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Boolean", credsIssuerConfig) - { - AddArgument("attr-name", "boolean"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterBoolean() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000000, mValue); - } - -private: - bool mValue; -}; - -class WriteTestClusterBitmap8 : public WriteAttribute -{ -public: - WriteTestClusterBitmap8(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Bitmap8", credsIssuerConfig) - { - AddArgument("attr-name", "bitmap8"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterBitmap8() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000001, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000001, mValue); - } - -private: - chip::BitMask mValue; -}; - -class WriteTestClusterBitmap16 : public WriteAttribute -{ -public: - WriteTestClusterBitmap16(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Bitmap16", credsIssuerConfig) - { - AddArgument("attr-name", "bitmap16"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterBitmap16() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000002, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000002, mValue); - } - -private: - chip::BitMask mValue; -}; - -class WriteTestClusterBitmap32 : public WriteAttribute -{ -public: - WriteTestClusterBitmap32(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Bitmap32", credsIssuerConfig) - { - AddArgument("attr-name", "bitmap32"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterBitmap32() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000003, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000003, mValue); - } - -private: - chip::BitMask mValue; -}; - -class WriteTestClusterBitmap64 : public WriteAttribute -{ -public: - WriteTestClusterBitmap64(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Bitmap64", credsIssuerConfig) - { - AddArgument("attr-name", "bitmap64"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterBitmap64() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000004, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000004, mValue); - } - -private: - chip::BitMask mValue; -}; - -class WriteTestClusterInt8u : public WriteAttribute -{ -public: - WriteTestClusterInt8u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int8u", credsIssuerConfig) - { - AddArgument("attr-name", "int8u"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterInt8u() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000005, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000005, mValue); - } +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - uint8_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster NitricOxideConcentrationMeasurement | 0x0412 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteTestClusterInt16u : public WriteAttribute -{ -public: - WriteTestClusterInt16u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int16u", credsIssuerConfig) - { - AddArgument("attr-name", "int16u"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ~WriteTestClusterInt16u() {} +/*----------------------------------------------------------------------------*\ +| Cluster OxygenConcentrationMeasurement | 0x0414 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000006, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster OzoneConcentrationMeasurement | 0x0415 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000006, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster SulfurDioxideConcentrationMeasurement | 0x0416 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - uint16_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster DissolvedOxygenConcentrationMeasurement | 0x0417 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteTestClusterInt24u : public WriteAttribute -{ -public: - WriteTestClusterInt24u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int24u", credsIssuerConfig) - { - AddArgument("attr-name", "int24u"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster BromateConcentrationMeasurement | 0x0418 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ~WriteTestClusterInt24u() {} +/*----------------------------------------------------------------------------*\ +| Cluster ChloraminesConcentrationMeasurement | 0x0419 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000007, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster ChlorineConcentrationMeasurement | 0x041A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000007, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster FecalColiformAndEColiConcentrationMeasurement | 0x041B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - uint32_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster FluorideConcentrationMeasurement | 0x041C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteTestClusterInt32u : public WriteAttribute -{ -public: - WriteTestClusterInt32u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int32u", credsIssuerConfig) - { - AddArgument("attr-name", "int32u"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster HaloaceticAcidsConcentrationMeasurement | 0x041D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ~WriteTestClusterInt32u() {} +/*----------------------------------------------------------------------------*\ +| Cluster TotalTrihalomethanesConcentrationMeasurement | 0x041E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000008, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster TotalColiformBacteriaConcentrationMeasurement | 0x041F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000008, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster TurbidityConcentrationMeasurement | 0x0420 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - uint32_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster CopperConcentrationMeasurement | 0x0421 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteTestClusterInt40u : public WriteAttribute -{ -public: - WriteTestClusterInt40u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int40u", credsIssuerConfig) - { - AddArgument("attr-name", "int40u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster LeadConcentrationMeasurement | 0x0422 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ~WriteTestClusterInt40u() {} +/*----------------------------------------------------------------------------*\ +| Cluster ManganeseConcentrationMeasurement | 0x0423 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000009, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster SulfateConcentrationMeasurement | 0x0424 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000009, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster BromodichloromethaneConcentrationMeasurement | 0x0425 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - uint64_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster BromoformConcentrationMeasurement | 0x0426 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteTestClusterInt48u : public WriteAttribute -{ -public: - WriteTestClusterInt48u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int48u", credsIssuerConfig) - { - AddArgument("attr-name", "int48u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster ChlorodibromomethaneConcentrationMeasurement | 0x0427 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ~WriteTestClusterInt48u() {} +/*----------------------------------------------------------------------------*\ +| Cluster ChloroformConcentrationMeasurement | 0x0428 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000A, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster SodiumConcentrationMeasurement | 0x0429 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000A, mValue); - } +/*----------------------------------------------------------------------------*\ +| Cluster WakeOnLan | 0x0503 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MACAddress | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -private: - uint64_t mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster Channel | 0x0504 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeChannel | 0x00 | +| * ChangeChannelByNumber | 0x02 | +| * SkipChannel | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ChannelList | 0x0000 | +| * Lineup | 0x0001 | +| * CurrentChannel | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ -class WriteTestClusterInt56u : public WriteAttribute +/* + * Command ChangeChannel + */ +class ChannelChangeChannel : public ClusterCommand { public: - WriteTestClusterInt56u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int56u", credsIssuerConfig) + ChannelChangeChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-channel", credsIssuerConfig) { - AddArgument("attr-name", "int56u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Match", &mRequest.match); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt56u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000000, mRequest); } private: - uint64_t mValue; + chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; }; -class WriteTestClusterInt64u : public WriteAttribute +/* + * Command ChangeChannelByNumber + */ +class ChannelChangeChannelByNumber : public ClusterCommand { public: - WriteTestClusterInt64u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int64u", credsIssuerConfig) + ChannelChangeChannelByNumber(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-channel-by-number", credsIssuerConfig) { - AddArgument("attr-name", "int64u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); + AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt64u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000002, mRequest); } private: - uint64_t mValue; + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; }; -class WriteTestClusterInt8s : public WriteAttribute +/* + * Command SkipChannel + */ +class ChannelSkipChannel : public ClusterCommand { public: - WriteTestClusterInt8s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int8s", credsIssuerConfig) + ChannelSkipChannel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-channel", credsIssuerConfig) { - AddArgument("attr-name", "int8s"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Count", 0, UINT16_MAX, &mRequest.count); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt8s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000504, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000504, 0x00000003, mRequest); } private: - int8_t mValue; + chip::app::Clusters::Channel::Commands::SkipChannel::Type mRequest; }; -class WriteTestClusterInt16s : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster TargetNavigator | 0x0505 | +|------------------------------------------------------------------------------| +| Commands: | | +| * NavigateTarget | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TargetList | 0x0000 | +| * CurrentTarget | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command NavigateTarget + */ +class TargetNavigatorNavigateTarget : public ClusterCommand { public: - WriteTestClusterInt16s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int16s", credsIssuerConfig) + TargetNavigatorNavigateTarget(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("navigate-target", credsIssuerConfig) { - AddArgument("attr-name", "int16s"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Target", 0, UINT8_MAX, &mRequest.target); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt16s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000505, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000505, 0x00000000, mRequest); } private: - int16_t mValue; + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; }; -class WriteTestClusterInt24s : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster MediaPlayback | 0x0506 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Play | 0x00 | +| * Pause | 0x01 | +| * StopPlayback | 0x02 | +| * StartOver | 0x03 | +| * Previous | 0x04 | +| * Next | 0x05 | +| * Rewind | 0x06 | +| * FastForward | 0x07 | +| * SkipForward | 0x08 | +| * SkipBackward | 0x09 | +| * Seek | 0x0B | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentState | 0x0000 | +| * StartTime | 0x0001 | +| * Duration | 0x0002 | +| * SampledPosition | 0x0003 | +| * PlaybackSpeed | 0x0004 | +| * SeekRangeEnd | 0x0005 | +| * SeekRangeStart | 0x0006 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command Play + */ +class MediaPlaybackPlay : public ClusterCommand { public: - WriteTestClusterInt24s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int24s", credsIssuerConfig) + MediaPlaybackPlay(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("play", credsIssuerConfig) { - AddArgument("attr-name", "int24s"); - AddArgument("attr-value", INT32_MIN, INT32_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt24s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000F, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000F, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000000, mRequest); } private: - int32_t mValue; + chip::app::Clusters::MediaPlayback::Commands::Play::Type mRequest; }; -class WriteTestClusterInt32s : public WriteAttribute +/* + * Command Pause + */ +class MediaPlaybackPause : public ClusterCommand { public: - WriteTestClusterInt32s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int32s", credsIssuerConfig) + MediaPlaybackPause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) { - AddArgument("attr-name", "int32s"); - AddArgument("attr-value", INT32_MIN, INT32_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt32s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000001, mRequest); } private: - int32_t mValue; + chip::app::Clusters::MediaPlayback::Commands::Pause::Type mRequest; }; -class WriteTestClusterInt40s : public WriteAttribute +/* + * Command StopPlayback + */ +class MediaPlaybackStopPlayback : public ClusterCommand { public: - WriteTestClusterInt40s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int40s", credsIssuerConfig) + MediaPlaybackStopPlayback(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-playback", credsIssuerConfig) { - AddArgument("attr-name", "int40s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt40s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000011, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000011, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000002, mRequest); } private: - int64_t mValue; + chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type mRequest; }; -class WriteTestClusterInt48s : public WriteAttribute +/* + * Command StartOver + */ +class MediaPlaybackStartOver : public ClusterCommand { public: - WriteTestClusterInt48s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int48s", credsIssuerConfig) + MediaPlaybackStartOver(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-over", credsIssuerConfig) { - AddArgument("attr-name", "int48s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt48s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000012, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000012, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000003, mRequest); } private: - int64_t mValue; + chip::app::Clusters::MediaPlayback::Commands::StartOver::Type mRequest; }; -class WriteTestClusterInt56s : public WriteAttribute +/* + * Command Previous + */ +class MediaPlaybackPrevious : public ClusterCommand { public: - WriteTestClusterInt56s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int56s", credsIssuerConfig) + MediaPlaybackPrevious(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("previous", credsIssuerConfig) { - AddArgument("attr-name", "int56s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt56s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000004, mRequest); } private: - int64_t mValue; + chip::app::Clusters::MediaPlayback::Commands::Previous::Type mRequest; }; -class WriteTestClusterInt64s : public WriteAttribute +/* + * Command Next + */ +class MediaPlaybackNext : public ClusterCommand { public: - WriteTestClusterInt64s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Int64s", credsIssuerConfig) + MediaPlaybackNext(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("next", credsIssuerConfig) { - AddArgument("attr-name", "int64s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterInt64s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000014, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000014, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000005, mRequest); } private: - int64_t mValue; + chip::app::Clusters::MediaPlayback::Commands::Next::Type mRequest; }; -class WriteTestClusterEnum8 : public WriteAttribute +/* + * Command Rewind + */ +class MediaPlaybackRewind : public ClusterCommand { public: - WriteTestClusterEnum8(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Enum8", credsIssuerConfig) + MediaPlaybackRewind(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rewind", credsIssuerConfig) { - AddArgument("attr-name", "enum8"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterEnum8() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000015, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000015, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000006, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::MediaPlayback::Commands::Rewind::Type mRequest; }; -class WriteTestClusterEnum16 : public WriteAttribute +/* + * Command FastForward + */ +class MediaPlaybackFastForward : public ClusterCommand { public: - WriteTestClusterEnum16(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Enum16", credsIssuerConfig) + MediaPlaybackFastForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("fast-forward", credsIssuerConfig) { - AddArgument("attr-name", "enum16"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterEnum16() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000016, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000016, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000007, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::MediaPlayback::Commands::FastForward::Type mRequest; }; -class WriteTestClusterFloatSingle : public WriteAttribute +/* + * Command SkipForward + */ +class MediaPlaybackSkipForward : public ClusterCommand { public: - WriteTestClusterFloatSingle(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("FloatSingle", credsIssuerConfig) + MediaPlaybackSkipForward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-forward", credsIssuerConfig) { - AddArgument("attr-name", "float-single"); - AddArgument("attr-value", -std::numeric_limits::infinity(), std::numeric_limits::infinity(), &mValue); - WriteAttribute::AddArguments(); + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); } - ~WriteTestClusterFloatSingle() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000017, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000017, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000008, mRequest); } private: - float mValue; + chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; }; -class WriteTestClusterFloatDouble : public WriteAttribute +/* + * Command SkipBackward + */ +class MediaPlaybackSkipBackward : public ClusterCommand { public: - WriteTestClusterFloatDouble(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("FloatDouble", credsIssuerConfig) + MediaPlaybackSkipBackward(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-backward", credsIssuerConfig) { - AddArgument("attr-name", "float-double"); - AddArgument("attr-value", -std::numeric_limits::infinity(), std::numeric_limits::infinity(), &mValue); - WriteAttribute::AddArguments(); + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); } - ~WriteTestClusterFloatDouble() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000018, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x00000009, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000018, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x00000009, mRequest); } private: - double mValue; + chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; }; -class WriteTestClusterOctetString : public WriteAttribute +/* + * Command Seek + */ +class MediaPlaybackSeek : public ClusterCommand { public: - WriteTestClusterOctetString(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("OctetString", credsIssuerConfig) + MediaPlaybackSeek(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("seek", credsIssuerConfig) { - AddArgument("attr-name", "octet-string"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("Position", 0, UINT64_MAX, &mRequest.position); + ClusterCommand::AddArguments(); } - ~WriteTestClusterOctetString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000019, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000506, 0x0000000B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000019, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000506, 0x0000000B, mRequest); } private: - chip::ByteSpan mValue; + chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; }; -class WriteTestClusterListInt8u : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster MediaInput | 0x0507 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelectInput | 0x00 | +| * ShowInputStatus | 0x01 | +| * HideInputStatus | 0x02 | +| * RenameInput | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * InputList | 0x0000 | +| * CurrentInput | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command SelectInput + */ +class MediaInputSelectInput : public ClusterCommand { public: - WriteTestClusterListInt8u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ListInt8u", credsIssuerConfig), mComplex(&mValue) + MediaInputSelectInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-input", credsIssuerConfig) { - AddArgument("attr-name", "list-int8u"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + ClusterCommand::AddArguments(); } - ~WriteTestClusterListInt8u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000001A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000001A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000000, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::MediaInput::Commands::SelectInput::Type mRequest; }; -class WriteTestClusterListOctetString : public WriteAttribute +/* + * Command ShowInputStatus + */ +class MediaInputShowInputStatus : public ClusterCommand { public: - WriteTestClusterListOctetString(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ListOctetString", credsIssuerConfig), mComplex(&mValue) + MediaInputShowInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("show-input-status", credsIssuerConfig) { - AddArgument("attr-name", "list-octet-string"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterListOctetString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000001B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000001B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000001, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type mRequest; }; -class WriteTestClusterListStructOctetString : public WriteAttribute +/* + * Command HideInputStatus + */ +class MediaInputHideInputStatus : public ClusterCommand { public: - WriteTestClusterListStructOctetString(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ListStructOctetString", credsIssuerConfig), mComplex(&mValue) + MediaInputHideInputStatus(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("hide-input-status", credsIssuerConfig) { - AddArgument("attr-name", "list-struct-octet-string"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterListStructOctetString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000001C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000001C, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000002, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> - mComplex; + chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type mRequest; }; -class WriteTestClusterLongOctetString : public WriteAttribute +/* + * Command RenameInput + */ +class MediaInputRenameInput : public ClusterCommand { public: - WriteTestClusterLongOctetString(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LongOctetString", credsIssuerConfig) + MediaInputRenameInput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-input", credsIssuerConfig) { - AddArgument("attr-name", "long-octet-string"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); + ClusterCommand::AddArguments(); } - ~WriteTestClusterLongOctetString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000001D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000507, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000001D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000507, 0x00000003, mRequest); } private: - chip::ByteSpan mValue; + chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; }; -class WriteTestClusterCharString : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster LowPower | 0x0508 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Sleep | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command Sleep + */ +class LowPowerSleep : public ClusterCommand { public: - WriteTestClusterCharString(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("CharString", credsIssuerConfig) + LowPowerSleep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("sleep", credsIssuerConfig) { - AddArgument("attr-name", "char-string"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterCharString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000001E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000508, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000001E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000508, 0x00000000, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::LowPower::Commands::Sleep::Type mRequest; }; -class WriteTestClusterLongCharString : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster KeypadInput | 0x0509 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SendKey | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command SendKey + */ +class KeypadInputSendKey : public ClusterCommand { public: - WriteTestClusterLongCharString(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("LongCharString", credsIssuerConfig) + KeypadInputSendKey(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("send-key", credsIssuerConfig) { - AddArgument("attr-name", "long-char-string"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); + ClusterCommand::AddArguments(); } - ~WriteTestClusterLongCharString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000001F, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000509, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000001F, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000509, 0x00000000, mRequest); } private: - chip::CharSpan mValue; + chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; }; -class WriteTestClusterEpochUs : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster ContentLauncher | 0x050A | +|------------------------------------------------------------------------------| +| Commands: | | +| * LaunchContent | 0x00 | +| * LaunchURL | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * AcceptHeader | 0x0000 | +| * SupportedStreamingProtocols | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command LaunchContent + */ +class ContentLauncherLaunchContent : public ClusterCommand { public: - WriteTestClusterEpochUs(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("EpochUs", credsIssuerConfig) + ContentLauncherLaunchContent(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("launch-content", credsIssuerConfig), mComplex_Search(&mRequest.search) { - AddArgument("attr-name", "epoch-us"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Search", &mComplex_Search); + AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); } - ~WriteTestClusterEpochUs() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000020, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050A, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000020, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050A, 0x00000000, mRequest); } private: - uint64_t mValue; + chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; + TypedComplexArgument mComplex_Search; }; -class WriteTestClusterEpochS : public WriteAttribute +/* + * Command LaunchURL + */ +class ContentLauncherLaunchURL : public ClusterCommand { public: - WriteTestClusterEpochS(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("EpochS", credsIssuerConfig) + ContentLauncherLaunchURL(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("launch-url", credsIssuerConfig), mComplex_BrandingInformation(&mRequest.brandingInformation) { - AddArgument("attr-name", "epoch-s"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("ContentURL", &mRequest.contentURL); + AddArgument("DisplayString", &mRequest.displayString); + AddArgument("BrandingInformation", &mComplex_BrandingInformation); + ClusterCommand::AddArguments(); } - ~WriteTestClusterEpochS() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000021, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050A, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000021, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050A, 0x00000001, mRequest); } private: - uint32_t mValue; + chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; + TypedComplexArgument> + mComplex_BrandingInformation; }; -class WriteTestClusterVendorId : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster AudioOutput | 0x050B | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelectOutput | 0x00 | +| * RenameOutput | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * OutputList | 0x0000 | +| * CurrentOutput | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command SelectOutput + */ +class AudioOutputSelectOutput : public ClusterCommand { public: - WriteTestClusterVendorId(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("VendorId", credsIssuerConfig) + AudioOutputSelectOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("select-output", credsIssuerConfig) { - AddArgument("attr-name", "vendor-id"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + ClusterCommand::AddArguments(); } - ~WriteTestClusterVendorId() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000022, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050B, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000022, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050B, 0x00000000, mRequest); } private: - chip::VendorId mValue; + chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type mRequest; }; -class WriteTestClusterListNullablesAndOptionalsStruct : public WriteAttribute +/* + * Command RenameOutput + */ +class AudioOutputRenameOutput : public ClusterCommand { public: - WriteTestClusterListNullablesAndOptionalsStruct(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ListNullablesAndOptionalsStruct", credsIssuerConfig), mComplex(&mValue) + AudioOutputRenameOutput(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("rename-output", credsIssuerConfig) { - AddArgument("attr-name", "list-nullables-and-optionals-struct"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); + ClusterCommand::AddArguments(); } - ~WriteTestClusterListNullablesAndOptionalsStruct() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000023, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050B, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000023, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050B, 0x00000001, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex; + chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type mRequest; }; -class WriteTestClusterEnumAttr : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster ApplicationLauncher | 0x050C | +|------------------------------------------------------------------------------| +| Commands: | | +| * LaunchApp | 0x00 | +| * StopApp | 0x01 | +| * HideApp | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CatalogList | 0x0000 | +| * CurrentApp | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command LaunchApp + */ +class ApplicationLauncherLaunchApp : public ClusterCommand { public: - WriteTestClusterEnumAttr(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("EnumAttr", credsIssuerConfig) + ApplicationLauncherLaunchApp(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("launch-app", credsIssuerConfig), mComplex_Application(&mRequest.application) { - AddArgument("attr-name", "enum-attr"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Application", &mComplex_Application); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); } - ~WriteTestClusterEnumAttr() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000024, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000024, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000000, mRequest); } private: - chip::app::Clusters::TestCluster::SimpleEnum mValue; + chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; + TypedComplexArgument mComplex_Application; }; -class WriteTestClusterStructAttr : public WriteAttribute +/* + * Command StopApp + */ +class ApplicationLauncherStopApp : public ClusterCommand { public: - WriteTestClusterStructAttr(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("StructAttr", credsIssuerConfig), mComplex(&mValue) + ApplicationLauncherStopApp(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("stop-app", credsIssuerConfig), mComplex_Application(&mRequest.application) { - AddArgument("attr-name", "struct-attr"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); } - ~WriteTestClusterStructAttr() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000025, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000025, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000001, mRequest); } private: - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type mValue; - TypedComplexArgument mComplex; + chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; + TypedComplexArgument mComplex_Application; }; -class WriteTestClusterRangeRestrictedInt8u : public WriteAttribute +/* + * Command HideApp + */ +class ApplicationLauncherHideApp : public ClusterCommand { public: - WriteTestClusterRangeRestrictedInt8u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RangeRestrictedInt8u", credsIssuerConfig) + ApplicationLauncherHideApp(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("hide-app", credsIssuerConfig), mComplex_Application(&mRequest.application) { - AddArgument("attr-name", "range-restricted-int8u"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); } - ~WriteTestClusterRangeRestrictedInt8u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000026, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050C, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000026, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050C, 0x00000002, mRequest); } private: - uint8_t mValue; + chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; + TypedComplexArgument mComplex_Application; }; -class WriteTestClusterRangeRestrictedInt8s : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster ApplicationBasic | 0x050D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0000 | +| * VendorID | 0x0001 | +| * ApplicationName | 0x0002 | +| * ProductID | 0x0003 | +| * Application | 0x0004 | +| * Status | 0x0005 | +| * ApplicationVersion | 0x0006 | +| * AllowedVendorList | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster AccountLogin | 0x050E | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetSetupPIN | 0x00 | +| * Login | 0x02 | +| * Logout | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command GetSetupPIN + */ +class AccountLoginGetSetupPIN : public ClusterCommand { public: - WriteTestClusterRangeRestrictedInt8s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RangeRestrictedInt8s", credsIssuerConfig) + AccountLoginGetSetupPIN(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-setup-pin", credsIssuerConfig) { - AddArgument("attr-name", "range-restricted-int8s"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + ClusterCommand::AddArguments(); } - ~WriteTestClusterRangeRestrictedInt8s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000027, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000027, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000000, mRequest); } private: - int8_t mValue; + chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; }; -class WriteTestClusterRangeRestrictedInt16u : public WriteAttribute +/* + * Command Login + */ +class AccountLoginLogin : public ClusterCommand { public: - WriteTestClusterRangeRestrictedInt16u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RangeRestrictedInt16u", credsIssuerConfig) + AccountLoginLogin(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("login", credsIssuerConfig) { - AddArgument("attr-name", "range-restricted-int16u"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + AddArgument("SetupPIN", &mRequest.setupPIN); + ClusterCommand::AddArguments(); } - ~WriteTestClusterRangeRestrictedInt16u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000028, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000028, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000002, mRequest); } private: - uint16_t mValue; + chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; }; -class WriteTestClusterRangeRestrictedInt16s : public WriteAttribute +/* + * Command Logout + */ +class AccountLoginLogout : public ClusterCommand { public: - WriteTestClusterRangeRestrictedInt16s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("RangeRestrictedInt16s", credsIssuerConfig) + AccountLoginLogout(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("logout", credsIssuerConfig) { - AddArgument("attr-name", "range-restricted-int16s"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterRangeRestrictedInt16s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000029, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000050E, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000029, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000050E, 0x00000003, mRequest); } private: - int16_t mValue; + chip::app::Clusters::AccountLogin::Commands::Logout::Type mRequest; }; -class WriteTestClusterListLongOctetString : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster Messaging | 0x0703 | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetLastMessage | 0x00 | +| * MessageConfirmation | 0x01 | +| * GetMessageCancellation | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command GetLastMessage + */ +class MessagingGetLastMessage : public ClusterCommand { public: - WriteTestClusterListLongOctetString(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ListLongOctetString", credsIssuerConfig), mComplex(&mValue) + MessagingGetLastMessage(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-last-message", credsIssuerConfig) { - AddArgument("attr-name", "list-long-octet-string"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterListLongOctetString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000002A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000703, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000002A, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000703, 0x00000000, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::Messaging::Commands::GetLastMessage::Type mRequest; }; -class WriteTestClusterListFabricScoped : public WriteAttribute +/* + * Command MessageConfirmation + */ +class MessagingMessageConfirmation : public ClusterCommand { public: - WriteTestClusterListFabricScoped(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ListFabricScoped", credsIssuerConfig), mComplex(&mValue) + MessagingMessageConfirmation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("message-confirmation", credsIssuerConfig) { - AddArgument("attr-name", "list-fabric-scoped"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("MessageId", 0, UINT32_MAX, &mRequest.messageId); + AddArgument("ConfirmationTime", 0, UINT32_MAX, &mRequest.confirmationTime); + AddArgument("MessageConfirmationControl", 0, UINT8_MAX, &mRequest.messageConfirmationControl); + AddArgument("MessageResponse", &mRequest.messageResponse); + ClusterCommand::AddArguments(); } - ~WriteTestClusterListFabricScoped() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000002B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000703, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000002B, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000703, 0x00000001, mRequest); } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> - mComplex; + chip::app::Clusters::Messaging::Commands::MessageConfirmation::Type mRequest; }; -class WriteTestClusterTimedWriteBoolean : public WriteAttribute +/* + * Command GetMessageCancellation + */ +class MessagingGetMessageCancellation : public ClusterCommand { public: - WriteTestClusterTimedWriteBoolean(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("TimedWriteBoolean", credsIssuerConfig) + MessagingGetMessageCancellation(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-message-cancellation", credsIssuerConfig) { - AddArgument("attr-name", "timed-write-boolean"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + AddArgument("EarliestImplementationTime", 0, UINT32_MAX, &mRequest.earliestImplementationTime); + ClusterCommand::AddArguments(); } - ~WriteTestClusterTimedWriteBoolean() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000030, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000703, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000030, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000703) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000703, 0x00000002, mRequest); } private: - bool mValue; + chip::app::Clusters::Messaging::Commands::GetMessageCancellation::Type mRequest; }; -class WriteTestClusterGeneralErrorBoolean : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster ApplianceIdentification | 0x0B00 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * BasicIdentification | 0x0000 | +| * CompanyName | 0x0010 | +| * CompanyId | 0x0011 | +| * BrandName | 0x0012 | +| * BrandId | 0x0013 | +| * Model | 0x0014 | +| * PartNumber | 0x0015 | +| * ProductRevision | 0x0016 | +| * SoftwareRevision | 0x0017 | +| * ProductTypeName | 0x0018 | +| * ProductTypeId | 0x0019 | +| * CecedSpecificationVersion | 0x001A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster MeterIdentification | 0x0B01 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CompanyName | 0x0000 | +| * MeterTypeId | 0x0001 | +| * DataQualityId | 0x0004 | +| * CustomerName | 0x0005 | +| * Model | 0x0006 | +| * PartNumber | 0x0007 | +| * ProductRevision | 0x0008 | +| * SoftwareRevision | 0x000A | +| * UtilityName | 0x000B | +| * Pod | 0x000C | +| * AvailablePower | 0x000D | +| * PowerThreshold | 0x000E | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster ApplianceEventsAndAlert | 0x0B02 | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetAlerts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command GetAlerts + */ +class ApplianceEventsAndAlertGetAlerts : public ClusterCommand { public: - WriteTestClusterGeneralErrorBoolean(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("GeneralErrorBoolean", credsIssuerConfig) + ApplianceEventsAndAlertGetAlerts(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-alerts", credsIssuerConfig) { - AddArgument("attr-name", "general-error-boolean"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterGeneralErrorBoolean() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000031, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000B02) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B02, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000031, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000B02) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B02, 0x00000000, mRequest); } private: - bool mValue; + chip::app::Clusters::ApplianceEventsAndAlert::Commands::GetAlerts::Type mRequest; }; -class WriteTestClusterClusterErrorBoolean : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster ApplianceStatistics | 0x0B03 | +|------------------------------------------------------------------------------| +| Commands: | | +| * LogRequest | 0x00 | +| * LogQueueRequest | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LogMaxSize | 0x0000 | +| * LogQueueMaxSize | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command LogRequest + */ +class ApplianceStatisticsLogRequest : public ClusterCommand { public: - WriteTestClusterClusterErrorBoolean(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("ClusterErrorBoolean", credsIssuerConfig) + ApplianceStatisticsLogRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("log-request", credsIssuerConfig) { - AddArgument("attr-name", "cluster-error-boolean"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + AddArgument("LogId", 0, UINT32_MAX, &mRequest.logId); + ClusterCommand::AddArguments(); } - ~WriteTestClusterClusterErrorBoolean() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000032, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B03, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000032, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B03, 0x00000000, mRequest); } private: - bool mValue; + chip::app::Clusters::ApplianceStatistics::Commands::LogRequest::Type mRequest; }; -class WriteTestClusterUnsupported : public WriteAttribute +/* + * Command LogQueueRequest + */ +class ApplianceStatisticsLogQueueRequest : public ClusterCommand { public: - WriteTestClusterUnsupported(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("Unsupported", credsIssuerConfig) + ApplianceStatisticsLogQueueRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("log-queue-request", credsIssuerConfig) { - AddArgument("attr-name", "unsupported"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterUnsupported() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x000000FF, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B03, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x000000FF, mValue); + ChipLogProgress(chipTool, "Sending cluster (0x00000B03) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B03, 0x00000001, mRequest); } private: - bool mValue; + chip::app::Clusters::ApplianceStatistics::Commands::LogQueueRequest::Type mRequest; }; -class WriteTestClusterNullableBoolean : public WriteAttribute +/*----------------------------------------------------------------------------*\ +| Cluster ElectricalMeasurement | 0x0B04 | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetProfileInfoCommand | 0x00 | +| * GetMeasurementProfileCommand | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasurementType | 0x0000 | +| * DcVoltage | 0x0100 | +| * DcVoltageMin | 0x0101 | +| * DcVoltageMax | 0x0102 | +| * DcCurrent | 0x0103 | +| * DcCurrentMin | 0x0104 | +| * DcCurrentMax | 0x0105 | +| * DcPower | 0x0106 | +| * DcPowerMin | 0x0107 | +| * DcPowerMax | 0x0108 | +| * DcVoltageMultiplier | 0x0200 | +| * DcVoltageDivisor | 0x0201 | +| * DcCurrentMultiplier | 0x0202 | +| * DcCurrentDivisor | 0x0203 | +| * DcPowerMultiplier | 0x0204 | +| * DcPowerDivisor | 0x0205 | +| * AcFrequency | 0x0300 | +| * AcFrequencyMin | 0x0301 | +| * AcFrequencyMax | 0x0302 | +| * NeutralCurrent | 0x0303 | +| * TotalActivePower | 0x0304 | +| * TotalReactivePower | 0x0305 | +| * TotalApparentPower | 0x0306 | +| * Measured1stHarmonicCurrent | 0x0307 | +| * Measured3rdHarmonicCurrent | 0x0308 | +| * Measured5thHarmonicCurrent | 0x0309 | +| * Measured7thHarmonicCurrent | 0x030A | +| * Measured9thHarmonicCurrent | 0x030B | +| * Measured11thHarmonicCurrent | 0x030C | +| * MeasuredPhase1stHarmonicCurrent | 0x030D | +| * MeasuredPhase3rdHarmonicCurrent | 0x030E | +| * MeasuredPhase5thHarmonicCurrent | 0x030F | +| * MeasuredPhase7thHarmonicCurrent | 0x0310 | +| * MeasuredPhase9thHarmonicCurrent | 0x0311 | +| * MeasuredPhase11thHarmonicCurrent | 0x0312 | +| * AcFrequencyMultiplier | 0x0400 | +| * AcFrequencyDivisor | 0x0401 | +| * PowerMultiplier | 0x0402 | +| * PowerDivisor | 0x0403 | +| * HarmonicCurrentMultiplier | 0x0404 | +| * PhaseHarmonicCurrentMultiplier | 0x0405 | +| * InstantaneousVoltage | 0x0500 | +| * InstantaneousLineCurrent | 0x0501 | +| * InstantaneousActiveCurrent | 0x0502 | +| * InstantaneousReactiveCurrent | 0x0503 | +| * InstantaneousPower | 0x0504 | +| * RmsVoltage | 0x0505 | +| * RmsVoltageMin | 0x0506 | +| * RmsVoltageMax | 0x0507 | +| * RmsCurrent | 0x0508 | +| * RmsCurrentMin | 0x0509 | +| * RmsCurrentMax | 0x050A | +| * ActivePower | 0x050B | +| * ActivePowerMin | 0x050C | +| * ActivePowerMax | 0x050D | +| * ReactivePower | 0x050E | +| * ApparentPower | 0x050F | +| * PowerFactor | 0x0510 | +| * AverageRmsVoltageMeasurementPeriod | 0x0511 | +| * AverageRmsUnderVoltageCounter | 0x0513 | +| * RmsExtremeOverVoltagePeriod | 0x0514 | +| * RmsExtremeUnderVoltagePeriod | 0x0515 | +| * RmsVoltageSagPeriod | 0x0516 | +| * RmsVoltageSwellPeriod | 0x0517 | +| * AcVoltageMultiplier | 0x0600 | +| * AcVoltageDivisor | 0x0601 | +| * AcCurrentMultiplier | 0x0602 | +| * AcCurrentDivisor | 0x0603 | +| * AcPowerMultiplier | 0x0604 | +| * AcPowerDivisor | 0x0605 | +| * OverloadAlarmsMask | 0x0700 | +| * VoltageOverload | 0x0701 | +| * CurrentOverload | 0x0702 | +| * AcOverloadAlarmsMask | 0x0800 | +| * AcVoltageOverload | 0x0801 | +| * AcCurrentOverload | 0x0802 | +| * AcActivePowerOverload | 0x0803 | +| * AcReactivePowerOverload | 0x0804 | +| * AverageRmsOverVoltage | 0x0805 | +| * AverageRmsUnderVoltage | 0x0806 | +| * RmsExtremeOverVoltage | 0x0807 | +| * RmsExtremeUnderVoltage | 0x0808 | +| * RmsVoltageSag | 0x0809 | +| * RmsVoltageSwell | 0x080A | +| * LineCurrentPhaseB | 0x0901 | +| * ActiveCurrentPhaseB | 0x0902 | +| * ReactiveCurrentPhaseB | 0x0903 | +| * RmsVoltagePhaseB | 0x0905 | +| * RmsVoltageMinPhaseB | 0x0906 | +| * RmsVoltageMaxPhaseB | 0x0907 | +| * RmsCurrentPhaseB | 0x0908 | +| * RmsCurrentMinPhaseB | 0x0909 | +| * RmsCurrentMaxPhaseB | 0x090A | +| * ActivePowerPhaseB | 0x090B | +| * ActivePowerMinPhaseB | 0x090C | +| * ActivePowerMaxPhaseB | 0x090D | +| * ReactivePowerPhaseB | 0x090E | +| * ApparentPowerPhaseB | 0x090F | +| * PowerFactorPhaseB | 0x0910 | +| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | +| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | +| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | +| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | +| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | +| * RmsVoltageSagPeriodPhaseB | 0x0916 | +| * RmsVoltageSwellPeriodPhaseB | 0x0917 | +| * LineCurrentPhaseC | 0x0A01 | +| * ActiveCurrentPhaseC | 0x0A02 | +| * ReactiveCurrentPhaseC | 0x0A03 | +| * RmsVoltagePhaseC | 0x0A05 | +| * RmsVoltageMinPhaseC | 0x0A06 | +| * RmsVoltageMaxPhaseC | 0x0A07 | +| * RmsCurrentPhaseC | 0x0A08 | +| * RmsCurrentMinPhaseC | 0x0A09 | +| * RmsCurrentMaxPhaseC | 0x0A0A | +| * ActivePowerPhaseC | 0x0A0B | +| * ActivePowerMinPhaseC | 0x0A0C | +| * ActivePowerMaxPhaseC | 0x0A0D | +| * ReactivePowerPhaseC | 0x0A0E | +| * ApparentPowerPhaseC | 0x0A0F | +| * PowerFactorPhaseC | 0x0A10 | +| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | +| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | +| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | +| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | +| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | +| * RmsVoltageSagPeriodPhaseC | 0x0A16 | +| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command GetProfileInfoCommand + */ +class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { public: - WriteTestClusterNullableBoolean(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableBoolean", credsIssuerConfig) + ElectricalMeasurementGetProfileInfoCommand(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-profile-info-command", credsIssuerConfig) { - AddArgument("attr-name", "nullable-boolean"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableBoolean() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004000, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004000, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteTestClusterNullableBitmap8 : public WriteAttribute -{ -public: - WriteTestClusterNullableBitmap8(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableBitmap8", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-bitmap8"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableBitmap8() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004001, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004001, mValue); - } - -private: - chip::app::DataModel::Nullable> mValue; -}; - -class WriteTestClusterNullableBitmap16 : public WriteAttribute -{ -public: - WriteTestClusterNullableBitmap16(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableBitmap16", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-bitmap16"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableBitmap16() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004002, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004002, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000000, mRequest); } private: - chip::app::DataModel::Nullable> mValue; + chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type mRequest; }; -class WriteTestClusterNullableBitmap32 : public WriteAttribute +/* + * Command GetMeasurementProfileCommand + */ +class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand { public: - WriteTestClusterNullableBitmap32(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableBitmap32", credsIssuerConfig) + ElectricalMeasurementGetMeasurementProfileCommand(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-measurement-profile-command", credsIssuerConfig) { - AddArgument("attr-name", "nullable-bitmap32"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); + AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); + AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableBitmap32() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004003, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004003, mValue); - } - -private: - chip::app::DataModel::Nullable> mValue; -}; - -class WriteTestClusterNullableBitmap64 : public WriteAttribute -{ -public: - WriteTestClusterNullableBitmap64(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableBitmap64", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-bitmap64"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableBitmap64() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004004, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000B04, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004004, mValue); - } - -private: - chip::app::DataModel::Nullable> mValue; -}; - -class WriteTestClusterNullableInt8u : public WriteAttribute -{ -public: - WriteTestClusterNullableInt8u(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("NullableInt8u", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-int8u"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableInt8u() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004005, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004005, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000B04, 0x00000001, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; }; -class WriteTestClusterNullableInt16u : public WriteAttribute -{ -public: - WriteTestClusterNullableInt16u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt16u", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-int16u"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableInt16u() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004006, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004006, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster TestCluster | 0xFFF1FC05| +|------------------------------------------------------------------------------| +| Commands: | | +| * Test | 0x00 | +| * TestNotHandled | 0x01 | +| * TestSpecific | 0x02 | +| * TestUnknownCommand | 0x03 | +| * TestAddArguments | 0x04 | +| * TestSimpleArgumentRequest | 0x05 | +| * TestStructArrayArgumentRequest | 0x06 | +| * TestStructArgumentRequest | 0x07 | +| * TestNestedStructArgumentRequest | 0x08 | +| * TestListStructArgumentRequest | 0x09 | +| * TestListInt8UArgumentRequest | 0x0A | +| * TestNestedStructListArgumentRequest | 0x0B | +| * TestListNestedStructListArgumentRequest | 0x0C | +| * TestListInt8UReverseRequest | 0x0D | +| * TestEnumsRequest | 0x0E | +| * TestNullableOptionalRequest | 0x0F | +| * TestComplexNullableOptionalRequest | 0x10 | +| * SimpleStructEchoRequest | 0x11 | +| * TimedInvokeRequest | 0x12 | +| * TestSimpleOptionalArgumentRequest | 0x13 | +| * TestEmitTestEventRequest | 0x14 | +| * TestEmitTestFabricScopedEventRequest | 0x15 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Boolean | 0x0000 | +| * Bitmap8 | 0x0001 | +| * Bitmap16 | 0x0002 | +| * Bitmap32 | 0x0003 | +| * Bitmap64 | 0x0004 | +| * Int8u | 0x0005 | +| * Int16u | 0x0006 | +| * Int24u | 0x0007 | +| * Int32u | 0x0008 | +| * Int40u | 0x0009 | +| * Int48u | 0x000A | +| * Int56u | 0x000B | +| * Int64u | 0x000C | +| * Int8s | 0x000D | +| * Int16s | 0x000E | +| * Int24s | 0x000F | +| * Int32s | 0x0010 | +| * Int40s | 0x0011 | +| * Int48s | 0x0012 | +| * Int56s | 0x0013 | +| * Int64s | 0x0014 | +| * Enum8 | 0x0015 | +| * Enum16 | 0x0016 | +| * FloatSingle | 0x0017 | +| * FloatDouble | 0x0018 | +| * OctetString | 0x0019 | +| * ListInt8u | 0x001A | +| * ListOctetString | 0x001B | +| * ListStructOctetString | 0x001C | +| * LongOctetString | 0x001D | +| * CharString | 0x001E | +| * LongCharString | 0x001F | +| * EpochUs | 0x0020 | +| * EpochS | 0x0021 | +| * VendorId | 0x0022 | +| * ListNullablesAndOptionalsStruct | 0x0023 | +| * EnumAttr | 0x0024 | +| * StructAttr | 0x0025 | +| * RangeRestrictedInt8u | 0x0026 | +| * RangeRestrictedInt8s | 0x0027 | +| * RangeRestrictedInt16u | 0x0028 | +| * RangeRestrictedInt16s | 0x0029 | +| * ListLongOctetString | 0x002A | +| * ListFabricScoped | 0x002B | +| * TimedWriteBoolean | 0x0030 | +| * GeneralErrorBoolean | 0x0031 | +| * ClusterErrorBoolean | 0x0032 | +| * Unsupported | 0x00FF | +| * NullableBoolean | 0x4000 | +| * NullableBitmap8 | 0x4001 | +| * NullableBitmap16 | 0x4002 | +| * NullableBitmap32 | 0x4003 | +| * NullableBitmap64 | 0x4004 | +| * NullableInt8u | 0x4005 | +| * NullableInt16u | 0x4006 | +| * NullableInt24u | 0x4007 | +| * NullableInt32u | 0x4008 | +| * NullableInt40u | 0x4009 | +| * NullableInt48u | 0x400A | +| * NullableInt56u | 0x400B | +| * NullableInt64u | 0x400C | +| * NullableInt8s | 0x400D | +| * NullableInt16s | 0x400E | +| * NullableInt24s | 0x400F | +| * NullableInt32s | 0x4010 | +| * NullableInt40s | 0x4011 | +| * NullableInt48s | 0x4012 | +| * NullableInt56s | 0x4013 | +| * NullableInt64s | 0x4014 | +| * NullableEnum8 | 0x4015 | +| * NullableEnum16 | 0x4016 | +| * NullableFloatSingle | 0x4017 | +| * NullableFloatDouble | 0x4018 | +| * NullableOctetString | 0x4019 | +| * NullableCharString | 0x401E | +| * NullableEnumAttr | 0x4024 | +| * NullableStruct | 0x4025 | +| * NullableRangeRestrictedInt8u | 0x4026 | +| * NullableRangeRestrictedInt8s | 0x4027 | +| * NullableRangeRestrictedInt16u | 0x4028 | +| * NullableRangeRestrictedInt16s | 0x4029 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * TestEvent | 0x0001 | +| * TestFabricScopedEvent | 0x0002 | +\*----------------------------------------------------------------------------*/ -class WriteTestClusterNullableInt24u : public WriteAttribute +/* + * Command Test + */ +class TestClusterTest : public ClusterCommand { public: - WriteTestClusterNullableInt24u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt24u", credsIssuerConfig) + TestClusterTest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test", credsIssuerConfig) { - AddArgument("attr-name", "nullable-int24u"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt24u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004007, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004007, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteTestClusterNullableInt32u : public WriteAttribute -{ -public: - WriteTestClusterNullableInt32u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt32u", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-int32u"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableInt32u() {} + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004008, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000000, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004008, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteTestClusterNullableInt40u : public WriteAttribute -{ -public: - WriteTestClusterNullableInt40u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt40u", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-int40u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableInt40u() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004009, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000000) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004009, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000000, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::Test::Type mRequest; }; -class WriteTestClusterNullableInt48u : public WriteAttribute +/* + * Command TestNotHandled + */ +class TestClusterTestNotHandled : public ClusterCommand { public: - WriteTestClusterNullableInt48u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt48u", credsIssuerConfig) + TestClusterTestNotHandled(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-not-handled", credsIssuerConfig) { - AddArgument("attr-name", "nullable-int48u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt48u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000400A, mValue); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000400A, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteTestClusterNullableInt56u : public WriteAttribute -{ -public: - WriteTestClusterNullableInt56u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt56u", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-int56u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableInt56u() {} + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on endpoint %u", endpointIds.at(0)); - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000400B, mValue); + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000001, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000400B, mValue); - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class WriteTestClusterNullableInt64u : public WriteAttribute -{ -public: - WriteTestClusterNullableInt64u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt64u", credsIssuerConfig) - { - AddArgument("attr-name", "nullable-int64u"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTestClusterNullableInt64u() {} - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000400C, mValue); - } + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000001) on Group %u", groupId); - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000400C, mValue); + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000001, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type mRequest; }; -class WriteTestClusterNullableInt8s : public WriteAttribute +/* + * Command TestSpecific + */ +class TestClusterTestSpecific : public ClusterCommand { public: - WriteTestClusterNullableInt8s(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("NullableInt8s", credsIssuerConfig) + TestClusterTestSpecific(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("test-specific", credsIssuerConfig) { - AddArgument("attr-name", "nullable-int8s"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt8s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000400D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000002, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000400D, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000002) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000002, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestSpecific::Type mRequest; }; -class WriteTestClusterNullableInt16s : public WriteAttribute +/* + * Command TestUnknownCommand + */ +class TestClusterTestUnknownCommand : public ClusterCommand { public: - WriteTestClusterNullableInt16s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt16s", credsIssuerConfig) + TestClusterTestUnknownCommand(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-unknown-command", credsIssuerConfig) { - AddArgument("attr-name", "nullable-int16s"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt16s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000400E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000003, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000400E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000003) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000003, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type mRequest; }; -class WriteTestClusterNullableInt24s : public WriteAttribute +/* + * Command TestAddArguments + */ +class TestClusterTestAddArguments : public ClusterCommand { public: - WriteTestClusterNullableInt24s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt24s", credsIssuerConfig) + TestClusterTestAddArguments(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-add-arguments", credsIssuerConfig) { - AddArgument("attr-name", "nullable-int24s"); - AddArgument("attr-value", INT32_MIN, INT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt24s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000400F, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000004, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000400F, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000004) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000004, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type mRequest; }; -class WriteTestClusterNullableInt32s : public WriteAttribute +/* + * Command TestSimpleArgumentRequest + */ +class TestClusterTestSimpleArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableInt32s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt32s", credsIssuerConfig) + TestClusterTestSimpleArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-simple-argument-request", credsIssuerConfig) { - AddArgument("attr-name", "nullable-int32s"); - AddArgument("attr-value", INT32_MIN, INT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", 0, 1, &mRequest.arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt32s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000005, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004010, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000005) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000005, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentRequest::Type mRequest; }; -class WriteTestClusterNullableInt40s : public WriteAttribute +/* + * Command TestStructArrayArgumentRequest + */ +class TestClusterTestStructArrayArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableInt40s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt40s", credsIssuerConfig) + TestClusterTestStructArrayArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-struct-array-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1), + mComplex_Arg2(&mRequest.arg2), mComplex_Arg3(&mRequest.arg3), mComplex_Arg4(&mRequest.arg4) { - AddArgument("attr-name", "nullable-int40s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + AddArgument("Arg2", &mComplex_Arg2); + AddArgument("Arg3", &mComplex_Arg3); + AddArgument("Arg4", &mComplex_Arg4); + AddArgument("Arg5", 0, UINT8_MAX, &mRequest.arg5); + AddArgument("Arg6", 0, 1, &mRequest.arg6); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt40s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004011, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000006, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004011, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000006) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000006, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentRequest::Type mRequest; + TypedComplexArgument> + mComplex_Arg1; + TypedComplexArgument> + mComplex_Arg2; + TypedComplexArgument> mComplex_Arg3; + TypedComplexArgument> mComplex_Arg4; }; -class WriteTestClusterNullableInt48s : public WriteAttribute +/* + * Command TestStructArgumentRequest + */ +class TestClusterTestStructArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableInt48s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt48s", credsIssuerConfig) + TestClusterTestStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-int48s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt48s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004012, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000007, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004012, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000007) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000007, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; }; -class WriteTestClusterNullableInt56s : public WriteAttribute +/* + * Command TestNestedStructArgumentRequest + */ +class TestClusterTestNestedStructArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableInt56s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt56s", credsIssuerConfig) + TestClusterTestNestedStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-nested-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-int56s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt56s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000008, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004013, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000008) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000008, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; }; -class WriteTestClusterNullableInt64s : public WriteAttribute +/* + * Command TestListStructArgumentRequest + */ +class TestClusterTestListStructArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableInt64s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableInt64s", credsIssuerConfig) + TestClusterTestListStructArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-struct-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-int64s"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableInt64s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004014, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000009, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004014, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000009) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000009, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type mRequest; + TypedComplexArgument> + mComplex_Arg1; }; -class WriteTestClusterNullableEnum8 : public WriteAttribute +/* + * Command TestListInt8UArgumentRequest + */ +class TestClusterTestListInt8UArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableEnum8(CredentialIssuerCommands * credsIssuerConfig) : WriteAttribute("NullableEnum8", credsIssuerConfig) + TestClusterTestListInt8UArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-int8uargument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-enum8"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableEnum8() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004015, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000A, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004015, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000A) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000A, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type mRequest; + TypedComplexArgument> mComplex_Arg1; }; -class WriteTestClusterNullableEnum16 : public WriteAttribute +/* + * Command TestNestedStructListArgumentRequest + */ +class TestClusterTestNestedStructListArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableEnum16(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableEnum16", credsIssuerConfig) + TestClusterTestNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-enum16"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableEnum16() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004016, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000B, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004016, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000B) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000B, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; }; -class WriteTestClusterNullableFloatSingle : public WriteAttribute +/* + * Command TestListNestedStructListArgumentRequest + */ +class TestClusterTestListNestedStructListArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableFloatSingle(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableFloatSingle", credsIssuerConfig) + TestClusterTestListNestedStructListArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-nested-struct-list-argument-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-float-single"); - AddArgument("attr-value", -std::numeric_limits::infinity(), std::numeric_limits::infinity(), &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableFloatSingle() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004017, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000C, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004017, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000C) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000C, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type mRequest; + TypedComplexArgument> + mComplex_Arg1; }; -class WriteTestClusterNullableFloatDouble : public WriteAttribute +/* + * Command TestListInt8UReverseRequest + */ +class TestClusterTestListInt8UReverseRequest : public ClusterCommand { public: - WriteTestClusterNullableFloatDouble(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableFloatDouble", credsIssuerConfig) + TestClusterTestListInt8UReverseRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-list-int8ureverse-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-float-double"); - AddArgument("attr-value", -std::numeric_limits::infinity(), std::numeric_limits::infinity(), &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableFloatDouble() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004018, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000D, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004018, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000D) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000D, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type mRequest; + TypedComplexArgument> mComplex_Arg1; }; -class WriteTestClusterNullableOctetString : public WriteAttribute +/* + * Command TestEnumsRequest + */ +class TestClusterTestEnumsRequest : public ClusterCommand { public: - WriteTestClusterNullableOctetString(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableOctetString", credsIssuerConfig) + TestClusterTestEnumsRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-enums-request", credsIssuerConfig) { - AddArgument("attr-name", "nullable-octet-string"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", 0, UINT16_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableOctetString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004019, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000E, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004019, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000E) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000E, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type mRequest; }; -class WriteTestClusterNullableCharString : public WriteAttribute +/* + * Command TestNullableOptionalRequest + */ +class TestClusterTestNullableOptionalRequest : public ClusterCommand { public: - WriteTestClusterNullableCharString(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableCharString", credsIssuerConfig) + TestClusterTestNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-nullable-optional-request", credsIssuerConfig) { - AddArgument("attr-name", "nullable-char-string"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableCharString() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000401E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x0000000F, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000401E, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x0000000F) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x0000000F, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type mRequest; }; -class WriteTestClusterNullableEnumAttr : public WriteAttribute +/* + * Command TestComplexNullableOptionalRequest + */ +class TestClusterTestComplexNullableOptionalRequest : public ClusterCommand { public: - WriteTestClusterNullableEnumAttr(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableEnumAttr", credsIssuerConfig) + TestClusterTestComplexNullableOptionalRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-complex-nullable-optional-request", credsIssuerConfig), + mComplex_NullableStruct(&mRequest.nullableStruct), mComplex_OptionalStruct(&mRequest.optionalStruct), + mComplex_NullableOptionalStruct(&mRequest.nullableOptionalStruct), mComplex_NullableList(&mRequest.nullableList), + mComplex_OptionalList(&mRequest.optionalList), mComplex_NullableOptionalList(&mRequest.nullableOptionalList) { - AddArgument("attr-name", "nullable-enum-attr"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("NullableInt", 0, UINT16_MAX, &mRequest.nullableInt); + AddArgument("OptionalInt", 0, UINT16_MAX, &mRequest.optionalInt); + AddArgument("NullableOptionalInt", 0, UINT16_MAX, &mRequest.nullableOptionalInt); + AddArgument("NullableString", &mRequest.nullableString); + AddArgument("OptionalString", &mRequest.optionalString); + AddArgument("NullableOptionalString", &mRequest.nullableOptionalString); + AddArgument("NullableStruct", &mComplex_NullableStruct); + AddArgument("OptionalStruct", &mComplex_OptionalStruct); + AddArgument("NullableOptionalStruct", &mComplex_NullableOptionalStruct); + AddArgument("NullableList", &mComplex_NullableList); + AddArgument("OptionalList", &mComplex_OptionalList); + AddArgument("NullableOptionalList", &mComplex_NullableOptionalList); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableEnumAttr() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004024, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000010, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004024, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000010) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000010, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalRequest::Type mRequest; + TypedComplexArgument> + mComplex_NullableStruct; + TypedComplexArgument> mComplex_OptionalStruct; + TypedComplexArgument< + chip::Optional>> + mComplex_NullableOptionalStruct; + TypedComplexArgument< + chip::app::DataModel::Nullable>> + mComplex_NullableList; + TypedComplexArgument>> + mComplex_OptionalList; + TypedComplexArgument>>> + mComplex_NullableOptionalList; }; -class WriteTestClusterNullableStruct : public WriteAttribute +/* + * Command SimpleStructEchoRequest + */ +class TestClusterSimpleStructEchoRequest : public ClusterCommand { public: - WriteTestClusterNullableStruct(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableStruct", credsIssuerConfig), mComplex(&mValue) + TestClusterSimpleStructEchoRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("simple-struct-echo-request", credsIssuerConfig), mComplex_Arg1(&mRequest.arg1) { - AddArgument("attr-name", "nullable-struct"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("Arg1", &mComplex_Arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableStruct() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004025, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000011, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004025, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000011) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000011, mRequest); } private: - chip::app::DataModel::Nullable mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type mRequest; + TypedComplexArgument mComplex_Arg1; }; -class WriteTestClusterNullableRangeRestrictedInt8u : public WriteAttribute +/* + * Command TimedInvokeRequest + */ +class TestClusterTimedInvokeRequest : public ClusterCommand { public: - WriteTestClusterNullableRangeRestrictedInt8u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableRangeRestrictedInt8u", credsIssuerConfig) + TestClusterTimedInvokeRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("timed-invoke-request", credsIssuerConfig) { - AddArgument("attr-name", "nullable-range-restricted-int8u"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableRangeRestrictedInt8u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004026, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000012, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004026, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000012) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000012, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type mRequest; }; -class WriteTestClusterNullableRangeRestrictedInt8s : public WriteAttribute +/* + * Command TestSimpleOptionalArgumentRequest + */ +class TestClusterTestSimpleOptionalArgumentRequest : public ClusterCommand { public: - WriteTestClusterNullableRangeRestrictedInt8s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableRangeRestrictedInt8s", credsIssuerConfig) + TestClusterTestSimpleOptionalArgumentRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-simple-optional-argument-request", credsIssuerConfig) { - AddArgument("attr-name", "nullable-range-restricted-int8s"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", 0, 1, &mRequest.arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableRangeRestrictedInt8s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004027, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000013, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004027, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000013) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000013, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type mRequest; }; -class WriteTestClusterNullableRangeRestrictedInt16u : public WriteAttribute +/* + * Command TestEmitTestEventRequest + */ +class TestClusterTestEmitTestEventRequest : public ClusterCommand { public: - WriteTestClusterNullableRangeRestrictedInt16u(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableRangeRestrictedInt16u", credsIssuerConfig) + TestClusterTestEmitTestEventRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-emit-test-event-request", credsIssuerConfig) { - AddArgument("attr-name", "nullable-range-restricted-int16u"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + AddArgument("Arg2", 0, UINT8_MAX, &mRequest.arg2); + AddArgument("Arg3", 0, 1, &mRequest.arg3); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableRangeRestrictedInt16u() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004028, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000014, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004028, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000014) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000014, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type mRequest; }; -class WriteTestClusterNullableRangeRestrictedInt16s : public WriteAttribute +/* + * Command TestEmitTestFabricScopedEventRequest + */ +class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand { public: - WriteTestClusterNullableRangeRestrictedInt16s(CredentialIssuerCommands * credsIssuerConfig) : - WriteAttribute("NullableRangeRestrictedInt16s", credsIssuerConfig) + TestClusterTestEmitTestFabricScopedEventRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-emit-test-fabric-scoped-event-request", credsIssuerConfig) { - AddArgument("attr-name", "nullable-range-restricted-int16s"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("Arg1", 0, UINT8_MAX, &mRequest.arg1); + ClusterCommand::AddArguments(); } - ~WriteTestClusterNullableRangeRestrictedInt16s() {} - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - return WriteAttribute::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00004029, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0xFFF1FC05, 0x00000015, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - return WriteAttribute::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00004029, mValue); + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) command (0x00000015) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0xFFF1FC05, 0x00000015, mRequest); } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -18049,57 +10090,100 @@ void registerClusterPowerConfiguration(Commands & commands, CredentialIssuerComm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "mains-voltage", Attributes::MainsVoltage::Id, credsIssuerConfig), // - make_unique(Id, "mains-frequency", Attributes::MainsFrequency::Id, credsIssuerConfig), // - make_unique(Id, "mains-alarm-mask", Attributes::MainsAlarmMask::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "mains-alarm-mask", 0, UINT8_MAX, Attributes::MainsAlarmMask::Id, + credsIssuerConfig), // + make_unique>(Id, "mains-voltage-min-threshold", 0, UINT16_MAX, + Attributes::MainsVoltageMinThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "mains-voltage-max-threshold", 0, UINT16_MAX, + Attributes::MainsVoltageMaxThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "mains-voltage-dwell-trip", 0, UINT16_MAX, Attributes::MainsVoltageDwellTrip::Id, + credsIssuerConfig), // + make_unique>(Id, "battery-manufacturer", Attributes::BatteryManufacturer::Id, + credsIssuerConfig), // + make_unique>(Id, "battery-size", 0, UINT8_MAX, Attributes::BatterySize::Id, credsIssuerConfig), // + make_unique>(Id, "battery-ahr-rating", 0, UINT16_MAX, Attributes::BatteryAhrRating::Id, + credsIssuerConfig), // + make_unique>(Id, "battery-quantity", 0, UINT8_MAX, Attributes::BatteryQuantity::Id, + credsIssuerConfig), // + make_unique>(Id, "battery-rated-voltage", 0, UINT8_MAX, Attributes::BatteryRatedVoltage::Id, + credsIssuerConfig), // + make_unique>(Id, "battery-alarm-mask", 0, UINT8_MAX, Attributes::BatteryAlarmMask::Id, + credsIssuerConfig), // + make_unique>(Id, "battery-voltage-min-threshold", 0, UINT8_MAX, + Attributes::BatteryVoltageMinThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "battery-voltage-threshold1", 0, UINT8_MAX, + Attributes::BatteryVoltageThreshold1::Id, credsIssuerConfig), // + make_unique>(Id, "battery-voltage-threshold2", 0, UINT8_MAX, + Attributes::BatteryVoltageThreshold2::Id, credsIssuerConfig), // + make_unique>(Id, "battery-voltage-threshold3", 0, UINT8_MAX, + Attributes::BatteryVoltageThreshold3::Id, credsIssuerConfig), // + make_unique>(Id, "battery-percentage-min-threshold", 0, UINT8_MAX, + Attributes::BatteryPercentageMinThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "battery-percentage-threshold1", 0, UINT8_MAX, + Attributes::BatteryPercentageThreshold1::Id, credsIssuerConfig), // + make_unique>(Id, "battery-percentage-threshold2", 0, UINT8_MAX, + Attributes::BatteryPercentageThreshold2::Id, credsIssuerConfig), // + make_unique>(Id, "battery-percentage-threshold3", 0, UINT8_MAX, + Attributes::BatteryPercentageThreshold3::Id, credsIssuerConfig), // + make_unique>(Id, "battery2manufacturer", Attributes::Battery2Manufacturer::Id, + credsIssuerConfig), // + make_unique>(Id, "battery2size", 0, UINT8_MAX, Attributes::Battery2Size::Id, credsIssuerConfig), // + make_unique>(Id, "battery2ahr-rating", 0, UINT16_MAX, Attributes::Battery2AhrRating::Id, + credsIssuerConfig), // + make_unique>(Id, "battery2quantity", 0, UINT8_MAX, Attributes::Battery2Quantity::Id, + credsIssuerConfig), // + make_unique>(Id, "battery2rated-voltage", 0, UINT8_MAX, Attributes::Battery2RatedVoltage::Id, + credsIssuerConfig), // + make_unique>(Id, "battery2alarm-mask", 0, UINT8_MAX, Attributes::Battery2AlarmMask::Id, + credsIssuerConfig), // + make_unique>(Id, "battery2voltage-min-threshold", 0, UINT8_MAX, + Attributes::Battery2VoltageMinThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "battery2voltage-threshold1", 0, UINT8_MAX, + Attributes::Battery2VoltageThreshold1::Id, credsIssuerConfig), // + make_unique>(Id, "battery2voltage-threshold2", 0, UINT8_MAX, + Attributes::Battery2VoltageThreshold2::Id, credsIssuerConfig), // + make_unique>(Id, "battery2voltage-threshold3", 0, UINT8_MAX, + Attributes::Battery2VoltageThreshold3::Id, credsIssuerConfig), // + make_unique>(Id, "battery2percentage-min-threshold", 0, UINT8_MAX, + Attributes::Battery2PercentageMinThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "battery2percentage-threshold1", 0, UINT8_MAX, + Attributes::Battery2PercentageThreshold1::Id, credsIssuerConfig), // + make_unique>(Id, "battery2percentage-threshold2", 0, UINT8_MAX, + Attributes::Battery2PercentageThreshold2::Id, credsIssuerConfig), // + make_unique>(Id, "battery2percentage-threshold3", 0, UINT8_MAX, + Attributes::Battery2PercentageThreshold3::Id, credsIssuerConfig), // + make_unique>(Id, "battery3manufacturer", Attributes::Battery3Manufacturer::Id, + credsIssuerConfig), // + make_unique>(Id, "battery3size", 0, UINT8_MAX, Attributes::Battery3Size::Id, credsIssuerConfig), // + make_unique>(Id, "battery3ahr-rating", 0, UINT16_MAX, Attributes::Battery3AhrRating::Id, + credsIssuerConfig), // + make_unique>(Id, "battery3quantity", 0, UINT8_MAX, Attributes::Battery3Quantity::Id, + credsIssuerConfig), // + make_unique>(Id, "battery3rated-voltage", 0, UINT8_MAX, Attributes::Battery3RatedVoltage::Id, + credsIssuerConfig), // + make_unique>(Id, "battery3alarm-mask", 0, UINT8_MAX, Attributes::Battery3AlarmMask::Id, + credsIssuerConfig), // + make_unique>(Id, "battery3voltage-min-threshold", 0, UINT8_MAX, + Attributes::Battery3VoltageMinThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "battery3voltage-threshold1", 0, UINT8_MAX, + Attributes::Battery3VoltageThreshold1::Id, credsIssuerConfig), // + make_unique>(Id, "battery3voltage-threshold2", 0, UINT8_MAX, + Attributes::Battery3VoltageThreshold2::Id, credsIssuerConfig), // + make_unique>(Id, "battery3voltage-threshold3", 0, UINT8_MAX, + Attributes::Battery3VoltageThreshold3::Id, credsIssuerConfig), // + make_unique>(Id, "battery3percentage-min-threshold", 0, UINT8_MAX, + Attributes::Battery3PercentageMinThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "battery3percentage-threshold1", 0, UINT8_MAX, + Attributes::Battery3PercentageThreshold1::Id, credsIssuerConfig), // + make_unique>(Id, "battery3percentage-threshold2", 0, UINT8_MAX, + Attributes::Battery3PercentageThreshold2::Id, credsIssuerConfig), // + make_unique>(Id, "battery3percentage-threshold3", 0, UINT8_MAX, + Attributes::Battery3PercentageThreshold3::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "mains-voltage", Attributes::MainsVoltage::Id, credsIssuerConfig), // + make_unique(Id, "mains-frequency", Attributes::MainsFrequency::Id, credsIssuerConfig), // + make_unique(Id, "mains-alarm-mask", Attributes::MainsAlarmMask::Id, credsIssuerConfig), // make_unique(Id, "mains-voltage-min-threshold", Attributes::MainsVoltageMinThreshold::Id, credsIssuerConfig), // make_unique(Id, "mains-voltage-max-threshold", Attributes::MainsVoltageMaxThreshold::Id, @@ -18227,20 +10311,25 @@ void registerClusterDeviceTemperatureConfiguration(Commands & commands, Credenti make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "current-temperature", Attributes::CurrentTemperature::Id, credsIssuerConfig), // - make_unique(Id, "min-temp-experienced", Attributes::MinTempExperienced::Id, credsIssuerConfig), // - make_unique(Id, "max-temp-experienced", Attributes::MaxTempExperienced::Id, credsIssuerConfig), // - make_unique(Id, "over-temp-total-dwell", Attributes::OverTempTotalDwell::Id, credsIssuerConfig), // - make_unique(Id, "device-temp-alarm-mask", Attributes::DeviceTempAlarmMask::Id, credsIssuerConfig), // - make_unique(Id, "low-temp-threshold", Attributes::LowTempThreshold::Id, credsIssuerConfig), // - make_unique(Id, "high-temp-threshold", Attributes::HighTempThreshold::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "device-temp-alarm-mask", 0, UINT8_MAX, Attributes::DeviceTempAlarmMask::Id, + credsIssuerConfig), // + make_unique>(Id, "low-temp-threshold", INT16_MIN, INT16_MAX, Attributes::LowTempThreshold::Id, + credsIssuerConfig), // + make_unique>(Id, "high-temp-threshold", INT16_MIN, INT16_MAX, Attributes::HighTempThreshold::Id, + credsIssuerConfig), // + make_unique>(Id, "low-temp-dwell-trip-point", 0, UINT32_MAX, Attributes::LowTempDwellTripPoint::Id, + credsIssuerConfig), // + make_unique>(Id, "high-temp-dwell-trip-point", 0, UINT32_MAX, + Attributes::HighTempDwellTripPoint::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-temperature", Attributes::CurrentTemperature::Id, credsIssuerConfig), // + make_unique(Id, "min-temp-experienced", Attributes::MinTempExperienced::Id, credsIssuerConfig), // + make_unique(Id, "max-temp-experienced", Attributes::MaxTempExperienced::Id, credsIssuerConfig), // + make_unique(Id, "over-temp-total-dwell", Attributes::OverTempTotalDwell::Id, credsIssuerConfig), // + make_unique(Id, "device-temp-alarm-mask", Attributes::DeviceTempAlarmMask::Id, credsIssuerConfig), // + make_unique(Id, "low-temp-threshold", Attributes::LowTempThreshold::Id, credsIssuerConfig), // + make_unique(Id, "high-temp-threshold", Attributes::HighTempThreshold::Id, credsIssuerConfig), // make_unique(Id, "low-temp-dwell-trip-point", Attributes::LowTempDwellTripPoint::Id, credsIssuerConfig), // make_unique(Id, "high-temp-dwell-trip-point", Attributes::HighTempDwellTripPoint::Id, @@ -18275,16 +10364,17 @@ void registerClusterIdentify(Commands & commands, CredentialIssuerCommands * cre // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "identify-time", Attributes::IdentifyTime::Id, credsIssuerConfig), // - make_unique(Id, "identify-type", Attributes::IdentifyType::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "identify-time", Attributes::IdentifyTime::Id, credsIssuerConfig), // + make_unique(Id, "identify-type", Attributes::IdentifyType::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "identify-time", 0, UINT16_MAX, Attributes::IdentifyTime::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "identify-time", Attributes::IdentifyTime::Id, credsIssuerConfig), // make_unique(Id, "identify-type", Attributes::IdentifyType::Id, credsIssuerConfig), // @@ -18329,7 +10419,7 @@ void registerClusterGroups(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -18382,7 +10472,7 @@ void registerClusterScenes(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // @@ -18424,21 +10514,23 @@ void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsI // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "on-off", Attributes::OnOff::Id, credsIssuerConfig), // - make_unique(Id, "global-scene-control", Attributes::GlobalSceneControl::Id, credsIssuerConfig), // - make_unique(Id, "on-time", Attributes::OnTime::Id, credsIssuerConfig), // - make_unique(Id, "off-wait-time", Attributes::OffWaitTime::Id, credsIssuerConfig), // - make_unique(Id, "start-up-on-off", Attributes::StartUpOnOff::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "on-off", Attributes::OnOff::Id, credsIssuerConfig), // + make_unique(Id, "global-scene-control", Attributes::GlobalSceneControl::Id, credsIssuerConfig), // + make_unique(Id, "on-time", Attributes::OnTime::Id, credsIssuerConfig), // + make_unique(Id, "off-wait-time", Attributes::OffWaitTime::Id, credsIssuerConfig), // + make_unique(Id, "start-up-on-off", Attributes::StartUpOnOff::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "on-time", 0, UINT16_MAX, Attributes::OnTime::Id, credsIssuerConfig), // + make_unique>(Id, "off-wait-time", 0, UINT16_MAX, Attributes::OffWaitTime::Id, + credsIssuerConfig), // + make_unique>>( + Id, "start-up-on-off", 0, UINT8_MAX, Attributes::StartUpOnOff::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "on-off", Attributes::OnOff::Id, credsIssuerConfig), // make_unique(Id, "global-scene-control", Attributes::GlobalSceneControl::Id, credsIssuerConfig), // @@ -18473,16 +10565,17 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands, CredentialIssu // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // - make_unique(Id, "switch-actions", Attributes::SwitchActions::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // + make_unique(Id, "switch-actions", Attributes::SwitchActions::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "switch-actions", 0, UINT8_MAX, Attributes::SwitchActions::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // make_unique(Id, "switch-actions", Attributes::SwitchActions::Id, credsIssuerConfig), // @@ -18523,34 +10616,40 @@ void registerClusterLevelControl(Commands & commands, CredentialIssuerCommands * // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // - make_unique(Id, "remaining-time", Attributes::RemainingTime::Id, credsIssuerConfig), // - make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // - make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // - make_unique(Id, "current-frequency", Attributes::CurrentFrequency::Id, credsIssuerConfig), // - make_unique(Id, "min-frequency", Attributes::MinFrequency::Id, credsIssuerConfig), // - make_unique(Id, "max-frequency", Attributes::MaxFrequency::Id, credsIssuerConfig), // - make_unique(Id, "options", Attributes::Options::Id, credsIssuerConfig), // - make_unique(Id, "on-off-transition-time", Attributes::OnOffTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "on-level", Attributes::OnLevel::Id, credsIssuerConfig), // - make_unique(Id, "on-transition-time", Attributes::OnTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "off-transition-time", Attributes::OffTransitionTime::Id, credsIssuerConfig), // - make_unique(Id, "default-move-rate", Attributes::DefaultMoveRate::Id, credsIssuerConfig), // - make_unique(Id, "start-up-current-level", Attributes::StartUpCurrentLevel::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "remaining-time", Attributes::RemainingTime::Id, credsIssuerConfig), // + make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // + make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // + make_unique(Id, "current-frequency", Attributes::CurrentFrequency::Id, credsIssuerConfig), // + make_unique(Id, "min-frequency", Attributes::MinFrequency::Id, credsIssuerConfig), // + make_unique(Id, "max-frequency", Attributes::MaxFrequency::Id, credsIssuerConfig), // + make_unique(Id, "options", Attributes::Options::Id, credsIssuerConfig), // + make_unique(Id, "on-off-transition-time", Attributes::OnOffTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "on-level", Attributes::OnLevel::Id, credsIssuerConfig), // + make_unique(Id, "on-transition-time", Attributes::OnTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "off-transition-time", Attributes::OffTransitionTime::Id, credsIssuerConfig), // + make_unique(Id, "default-move-rate", Attributes::DefaultMoveRate::Id, credsIssuerConfig), // + make_unique(Id, "start-up-current-level", Attributes::StartUpCurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "options", 0, UINT8_MAX, Attributes::Options::Id, credsIssuerConfig), // + make_unique>(Id, "on-off-transition-time", 0, UINT16_MAX, Attributes::OnOffTransitionTime::Id, + credsIssuerConfig), // + make_unique>>(Id, "on-level", 0, UINT8_MAX, Attributes::OnLevel::Id, + credsIssuerConfig), // + make_unique>>( + Id, "on-transition-time", 0, UINT16_MAX, Attributes::OnTransitionTime::Id, credsIssuerConfig), // + make_unique>>( + Id, "off-transition-time", 0, UINT16_MAX, Attributes::OffTransitionTime::Id, credsIssuerConfig), // + make_unique>>(Id, "default-move-rate", 0, UINT8_MAX, + Attributes::DefaultMoveRate::Id, credsIssuerConfig), // + make_unique>>( + Id, "start-up-current-level", 0, UINT8_MAX, Attributes::StartUpCurrentLevel::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // make_unique(Id, "remaining-time", Attributes::RemainingTime::Id, credsIssuerConfig), // @@ -18605,7 +10704,7 @@ void registerClusterAlarms(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "alarm-count", Attributes::AlarmCount::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -18636,30 +10735,31 @@ void registerClusterTime(Commands & commands, CredentialIssuerCommands * credsIs // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "time", Attributes::Time::Id, credsIssuerConfig), // - make_unique(Id, "time-status", Attributes::TimeStatus::Id, credsIssuerConfig), // - make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // - make_unique(Id, "dst-start", Attributes::DstStart::Id, credsIssuerConfig), // - make_unique(Id, "dst-end", Attributes::DstEnd::Id, credsIssuerConfig), // - make_unique(Id, "dst-shift", Attributes::DstShift::Id, credsIssuerConfig), // - make_unique(Id, "standard-time", Attributes::StandardTime::Id, credsIssuerConfig), // - make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // - make_unique(Id, "last-set-time", Attributes::LastSetTime::Id, credsIssuerConfig), // - make_unique(Id, "valid-until-time", Attributes::ValidUntilTime::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "time", Attributes::Time::Id, credsIssuerConfig), // + make_unique(Id, "time-status", Attributes::TimeStatus::Id, credsIssuerConfig), // + make_unique(Id, "time-zone", Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique(Id, "dst-start", Attributes::DstStart::Id, credsIssuerConfig), // + make_unique(Id, "dst-end", Attributes::DstEnd::Id, credsIssuerConfig), // + make_unique(Id, "dst-shift", Attributes::DstShift::Id, credsIssuerConfig), // + make_unique(Id, "standard-time", Attributes::StandardTime::Id, credsIssuerConfig), // + make_unique(Id, "local-time", Attributes::LocalTime::Id, credsIssuerConfig), // + make_unique(Id, "last-set-time", Attributes::LastSetTime::Id, credsIssuerConfig), // + make_unique(Id, "valid-until-time", Attributes::ValidUntilTime::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "time", 0, UINT32_MAX, Attributes::Time::Id, credsIssuerConfig), // + make_unique>(Id, "time-status", 0, UINT8_MAX, Attributes::TimeStatus::Id, credsIssuerConfig), // + make_unique>(Id, "time-zone", INT32_MIN, INT32_MAX, Attributes::TimeZone::Id, credsIssuerConfig), // + make_unique>(Id, "dst-start", 0, UINT32_MAX, Attributes::DstStart::Id, credsIssuerConfig), // + make_unique>(Id, "dst-end", 0, UINT32_MAX, Attributes::DstEnd::Id, credsIssuerConfig), // + make_unique>(Id, "dst-shift", INT32_MIN, INT32_MAX, Attributes::DstShift::Id, credsIssuerConfig), // + make_unique>(Id, "valid-until-time", 0, UINT32_MAX, Attributes::ValidUntilTime::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "time", Attributes::Time::Id, credsIssuerConfig), // make_unique(Id, "time-status", Attributes::TimeStatus::Id, credsIssuerConfig), // @@ -18714,13 +10814,13 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // + make_unique>(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique>(Id, "inactive-text", Attributes::InactiveText::Id, credsIssuerConfig), // + make_unique>(Id, "out-of-service", 0, 1, Attributes::OutOfService::Id, credsIssuerConfig), // + make_unique>(Id, "present-value", 0, 1, Attributes::PresentValue::Id, credsIssuerConfig), // + make_unique>(Id, "reliability", 0, UINT8_MAX, Attributes::Reliability::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // @@ -18768,30 +10868,30 @@ void registerClusterPowerProfile(Commands & commands, CredentialIssuerCommands * // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "total-profile-num", Attributes::TotalProfileNum::Id, credsIssuerConfig), // - make_unique(Id, "multiple-scheduling", Attributes::MultipleScheduling::Id, credsIssuerConfig), // - make_unique(Id, "energy-formatting", Attributes::EnergyFormatting::Id, credsIssuerConfig), // - make_unique(Id, "energy-remote", Attributes::EnergyRemote::Id, credsIssuerConfig), // - make_unique(Id, "schedule-mode", Attributes::ScheduleMode::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "total-profile-num", Attributes::TotalProfileNum::Id, credsIssuerConfig), // - make_unique(Id, "multiple-scheduling", Attributes::MultipleScheduling::Id, credsIssuerConfig), // - make_unique(Id, "energy-formatting", Attributes::EnergyFormatting::Id, credsIssuerConfig), // - make_unique(Id, "energy-remote", Attributes::EnergyRemote::Id, credsIssuerConfig), // - make_unique(Id, "schedule-mode", Attributes::ScheduleMode::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "total-profile-num", Attributes::TotalProfileNum::Id, credsIssuerConfig), // + make_unique(Id, "multiple-scheduling", Attributes::MultipleScheduling::Id, credsIssuerConfig), // + make_unique(Id, "energy-formatting", Attributes::EnergyFormatting::Id, credsIssuerConfig), // + make_unique(Id, "energy-remote", Attributes::EnergyRemote::Id, credsIssuerConfig), // + make_unique(Id, "schedule-mode", Attributes::ScheduleMode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "schedule-mode", 0, UINT8_MAX, Attributes::ScheduleMode::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "total-profile-num", Attributes::TotalProfileNum::Id, credsIssuerConfig), // + make_unique(Id, "multiple-scheduling", Attributes::MultipleScheduling::Id, credsIssuerConfig), // + make_unique(Id, "energy-formatting", Attributes::EnergyFormatting::Id, credsIssuerConfig), // + make_unique(Id, "energy-remote", Attributes::EnergyRemote::Id, credsIssuerConfig), // + make_unique(Id, "schedule-mode", Attributes::ScheduleMode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // @@ -18830,7 +10930,7 @@ void registerClusterApplianceControl(Commands & commands, CredentialIssuerComman make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "start-time", Attributes::StartTime::Id, credsIssuerConfig), // make_unique(Id, "finish-time", Attributes::FinishTime::Id, credsIssuerConfig), // @@ -18869,7 +10969,7 @@ void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCo make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -18909,7 +11009,7 @@ void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "device-list", Attributes::DeviceList::Id, credsIssuerConfig), // make_unique(Id, "server-list", Attributes::ServerList::Id, credsIssuerConfig), // @@ -18943,15 +11043,17 @@ void registerClusterBinding(Commands & commands, CredentialIssuerCommands * cred // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "binding", Attributes::Binding::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "binding", Attributes::Binding::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "binding", Attributes::Binding::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "binding", Attributes::Binding::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -18996,12 +11098,16 @@ void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // - make_unique(Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // + make_unique>>( + Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "acl", Attributes::Acl::Id, credsIssuerConfig), // + make_unique(Id, "extension", Attributes::Extension::Id, credsIssuerConfig), // make_unique(Id, "subjects-per-access-control-entry", Attributes::SubjectsPerAccessControlEntry::Id, credsIssuerConfig), // make_unique(Id, "targets-per-access-control-entry", Attributes::TargetsPerAccessControlEntry::Id, @@ -19047,22 +11153,24 @@ void registerClusterPollControl(Commands & commands, CredentialIssuerCommands * // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "check-in-interval", Attributes::CheckInInterval::Id, credsIssuerConfig), // - make_unique(Id, "long-poll-interval", Attributes::LongPollInterval::Id, credsIssuerConfig), // - make_unique(Id, "short-poll-interval", Attributes::ShortPollInterval::Id, credsIssuerConfig), // - make_unique(Id, "fast-poll-timeout", Attributes::FastPollTimeout::Id, credsIssuerConfig), // - make_unique(Id, "check-in-interval-min", Attributes::CheckInIntervalMin::Id, credsIssuerConfig), // - make_unique(Id, "long-poll-interval-min", Attributes::LongPollIntervalMin::Id, credsIssuerConfig), // - make_unique(Id, "fast-poll-timeout-max", Attributes::FastPollTimeoutMax::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "check-in-interval", Attributes::CheckInInterval::Id, credsIssuerConfig), // + make_unique(Id, "long-poll-interval", Attributes::LongPollInterval::Id, credsIssuerConfig), // + make_unique(Id, "short-poll-interval", Attributes::ShortPollInterval::Id, credsIssuerConfig), // + make_unique(Id, "fast-poll-timeout", Attributes::FastPollTimeout::Id, credsIssuerConfig), // + make_unique(Id, "check-in-interval-min", Attributes::CheckInIntervalMin::Id, credsIssuerConfig), // + make_unique(Id, "long-poll-interval-min", Attributes::LongPollIntervalMin::Id, credsIssuerConfig), // + make_unique(Id, "fast-poll-timeout-max", Attributes::FastPollTimeoutMax::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "check-in-interval", 0, UINT32_MAX, Attributes::CheckInInterval::Id, + credsIssuerConfig), // + make_unique>(Id, "fast-poll-timeout", 0, UINT16_MAX, Attributes::FastPollTimeout::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "check-in-interval", Attributes::CheckInInterval::Id, credsIssuerConfig), // make_unique(Id, "long-poll-interval", Attributes::LongPollInterval::Id, credsIssuerConfig), // @@ -19120,7 +11228,7 @@ void registerClusterBridgedActions(Commands & commands, CredentialIssuerCommands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "action-list", Attributes::ActionList::Id, credsIssuerConfig), // make_unique(Id, "endpoint-list", Attributes::EndpointList::Id, credsIssuerConfig), // @@ -19158,36 +11266,37 @@ void registerClusterBasic(Commands & commands, CredentialIssuerCommands * credsI // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // - make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // - make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // - make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // - make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // - make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // - make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // - make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // - make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // - make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // - make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // - make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // - make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // - make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // - make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // - make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // - make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // + make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // + make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // + make_unique(Id, "product-name", Attributes::ProductName::Id, credsIssuerConfig), // + make_unique(Id, "product-id", Attributes::ProductID::Id, credsIssuerConfig), // + make_unique(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique(Id, "location", Attributes::Location::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version", Attributes::HardwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "hardware-version-string", Attributes::HardwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "software-version", Attributes::SoftwareVersion::Id, credsIssuerConfig), // + make_unique(Id, "software-version-string", Attributes::SoftwareVersionString::Id, credsIssuerConfig), // + make_unique(Id, "manufacturing-date", Attributes::ManufacturingDate::Id, credsIssuerConfig), // + make_unique(Id, "part-number", Attributes::PartNumber::Id, credsIssuerConfig), // + make_unique(Id, "product-url", Attributes::ProductURL::Id, credsIssuerConfig), // + make_unique(Id, "product-label", Attributes::ProductLabel::Id, credsIssuerConfig), // + make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // + make_unique(Id, "local-config-disabled", Attributes::LocalConfigDisabled::Id, credsIssuerConfig), // + make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // + make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // + make_unique>(Id, "location", Attributes::Location::Id, credsIssuerConfig), // + make_unique>(Id, "local-config-disabled", 0, 1, Attributes::LocalConfigDisabled::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "data-model-revision", Attributes::DataModelRevision::Id, credsIssuerConfig), // make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // @@ -19254,7 +11363,7 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands, CredentialIss make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -19285,18 +11394,20 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands, CredentialIs // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "default-ota-providers", Attributes::DefaultOtaProviders::Id, credsIssuerConfig), // - make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // - make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // - make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "default-ota-providers", Attributes::DefaultOtaProviders::Id, credsIssuerConfig), // + make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // + make_unique(Id, "update-state", Attributes::UpdateState::Id, credsIssuerConfig), // + make_unique(Id, "update-state-progress", Attributes::UpdateStateProgress::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "default-ota-providers", Attributes::DefaultOtaProviders::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "default-ota-providers", Attributes::DefaultOtaProviders::Id, credsIssuerConfig), // make_unique(Id, "update-possible", Attributes::UpdatePossible::Id, credsIssuerConfig), // @@ -19344,8 +11455,8 @@ void registerClusterLocalizationConfiguration(Commands & commands, CredentialIss make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "active-locale", Attributes::ActiveLocale::Id, credsIssuerConfig), // make_unique(Id, "supported-locales", Attributes::SupportedLocales::Id, credsIssuerConfig), // @@ -19386,12 +11497,14 @@ void registerClusterTimeFormatLocalization(Commands & commands, CredentialIssuer make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // - make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "hour-format", 0, UINT8_MAX, Attributes::HourFormat::Id, credsIssuerConfig), // + make_unique>( + Id, "active-calendar-type", 0, UINT8_MAX, Attributes::ActiveCalendarType::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "hour-format", Attributes::HourFormat::Id, credsIssuerConfig), // + make_unique(Id, "active-calendar-type", Attributes::ActiveCalendarType::Id, credsIssuerConfig), // make_unique(Id, "supported-calendar-types", Attributes::SupportedCalendarTypes::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -19422,15 +11535,16 @@ void registerClusterUnitLocalization(Commands & commands, CredentialIssuerComman // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "temperature-unit", 0, UINT8_MAX, Attributes::TemperatureUnit::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "temperature-unit", Attributes::TemperatureUnit::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -19468,7 +11582,7 @@ void registerClusterPowerSourceConfiguration(Commands & commands, CredentialIssu make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "sources", Attributes::Sources::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -19545,7 +11659,7 @@ void registerClusterPowerSource(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // make_unique(Id, "order", Attributes::Order::Id, credsIssuerConfig), // @@ -19627,16 +11741,16 @@ void registerClusterGeneralCommissioning(Commands & commands, CredentialIssuerCo make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // make_unique(Id, "location-capability", Attributes::LocationCapability::Id, credsIssuerConfig), // make_unique(Id, "supports-concurrent-connection", Attributes::SupportsConcurrentConnection::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "breadcrumb", 0, UINT64_MAX, Attributes::Breadcrumb::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "breadcrumb", Attributes::Breadcrumb::Id, credsIssuerConfig), // make_unique(Id, "basic-commissioning-info", Attributes::BasicCommissioningInfo::Id, credsIssuerConfig), // make_unique(Id, "regulatory-config", Attributes::RegulatoryConfig::Id, credsIssuerConfig), // @@ -19677,26 +11791,26 @@ void registerClusterNetworkCommissioning(Commands & commands, CredentialIssuerCo // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // - make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // - make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, credsIssuerConfig), // - make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // - make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // - make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // - make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // - make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // - make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // + make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // + make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, credsIssuerConfig), // + make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // + make_unique(Id, "last-networking-status", Attributes::LastNetworkingStatus::Id, credsIssuerConfig), // + make_unique(Id, "last-network-id", Attributes::LastNetworkID::Id, credsIssuerConfig), // + make_unique(Id, "last-connect-error-value", Attributes::LastConnectErrorValue::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "interface-enabled", 0, 1, Attributes::InterfaceEnabled::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-networks", Attributes::MaxNetworks::Id, credsIssuerConfig), // + make_unique(Id, "networks", Attributes::Networks::Id, credsIssuerConfig), // + make_unique(Id, "scan-max-time-seconds", Attributes::ScanMaxTimeSeconds::Id, credsIssuerConfig), // make_unique(Id, "connect-max-time-seconds", Attributes::ConnectMaxTimeSeconds::Id, credsIssuerConfig), // make_unique(Id, "interface-enabled", Attributes::InterfaceEnabled::Id, credsIssuerConfig), // @@ -19739,7 +11853,7 @@ void registerClusterDiagnosticLogs(Commands & commands, CredentialIssuerCommands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -19786,7 +11900,7 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // @@ -19846,7 +11960,7 @@ void registerClusterSoftwareDiagnostics(Commands & commands, CredentialIssuerCom make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "thread-metrics", Attributes::ThreadMetrics::Id, credsIssuerConfig), // make_unique(Id, "current-heap-free", Attributes::CurrentHeapFree::Id, credsIssuerConfig), // @@ -19960,7 +12074,7 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands, CredentialIssu make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "channel", Attributes::Channel::Id, credsIssuerConfig), // make_unique(Id, "routing-role", Attributes::RoutingRole::Id, credsIssuerConfig), // @@ -20087,7 +12201,7 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands, CredentialIssuer make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "bssid", Attributes::Bssid::Id, credsIssuerConfig), // make_unique(Id, "security-type", Attributes::SecurityType::Id, credsIssuerConfig), // @@ -20154,7 +12268,7 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands, CredentialIs make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "phyrate", Attributes::PHYRate::Id, credsIssuerConfig), // make_unique(Id, "full-duplex", Attributes::FullDuplex::Id, credsIssuerConfig), // @@ -20199,7 +12313,7 @@ void registerClusterTimeSynchronization(Commands & commands, CredentialIssuerCom make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -20250,8 +12364,8 @@ void registerClusterBridgedDeviceBasic(Commands & commands, CredentialIssuerComm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "node-label", Attributes::NodeLabel::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // @@ -20313,7 +12427,7 @@ void registerClusterSwitch(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "number-of-positions", Attributes::NumberOfPositions::Id, credsIssuerConfig), // make_unique(Id, "current-position", Attributes::CurrentPosition::Id, credsIssuerConfig), // @@ -20372,7 +12486,7 @@ void registerClusterAdministratorCommissioning(Commands & commands, CredentialIs make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "window-status", Attributes::WindowStatus::Id, credsIssuerConfig), // make_unique(Id, "admin-fabric-index", Attributes::AdminFabricIndex::Id, credsIssuerConfig), // @@ -20425,7 +12539,7 @@ void registerClusterOperationalCredentials(Commands & commands, CredentialIssuer make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "nocs", Attributes::NOCs::Id, credsIssuerConfig), // make_unique(Id, "fabrics", Attributes::Fabrics::Id, credsIssuerConfig), // @@ -20476,12 +12590,14 @@ void registerClusterGroupKeyManagement(Commands & commands, CredentialIssuerComm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // - make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // - make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "group-key-map", Attributes::GroupKeyMap::Id, credsIssuerConfig), // + make_unique(Id, "group-table", Attributes::GroupTable::Id, credsIssuerConfig), // + make_unique(Id, "max-groups-per-fabric", Attributes::MaxGroupsPerFabric::Id, credsIssuerConfig), // make_unique(Id, "max-group-keys-per-fabric", Attributes::MaxGroupKeysPerFabric::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -20519,7 +12635,7 @@ void registerClusterFixedLabel(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -20550,15 +12666,17 @@ void registerClusterUserLabel(Commands & commands, CredentialIssuerCommands * cr // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "label-list", Attributes::LabelList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -20595,7 +12713,7 @@ void registerClusterProxyConfiguration(Commands & commands, CredentialIssuerComm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -20631,7 +12749,7 @@ void registerClusterProxyDiscovery(Commands & commands, CredentialIssuerCommands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -20667,7 +12785,7 @@ void registerClusterProxyValid(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -20704,7 +12822,7 @@ void registerClusterBooleanState(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "state-value", Attributes::StateValue::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -20738,21 +12856,23 @@ void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * c // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // - make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // - make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // + make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>(Id, "start-up-mode", 0, UINT8_MAX, + Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // make_unique(Id, "standard-namespace", Attributes::StandardNamespace::Id, credsIssuerConfig), // @@ -20788,32 +12908,32 @@ void registerClusterShadeConfiguration(Commands & commands, CredentialIssuerComm // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "physical-closed-limit", Attributes::PhysicalClosedLimit::Id, credsIssuerConfig), // - make_unique(Id, "motor-step-size", Attributes::MotorStepSize::Id, credsIssuerConfig), // - make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // - make_unique(Id, "closed-limit", Attributes::ClosedLimit::Id, credsIssuerConfig), // - make_unique(Id, "mode", Attributes::Mode::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "physical-closed-limit", Attributes::PhysicalClosedLimit::Id, credsIssuerConfig), // - make_unique(Id, "motor-step-size", Attributes::MotorStepSize::Id, credsIssuerConfig), // - make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // - make_unique(Id, "closed-limit", Attributes::ClosedLimit::Id, credsIssuerConfig), // - make_unique(Id, "mode", Attributes::Mode::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "physical-closed-limit", Attributes::PhysicalClosedLimit::Id, credsIssuerConfig), // + make_unique(Id, "motor-step-size", Attributes::MotorStepSize::Id, credsIssuerConfig), // + make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // + make_unique(Id, "closed-limit", Attributes::ClosedLimit::Id, credsIssuerConfig), // + make_unique(Id, "mode", Attributes::Mode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "status", 0, UINT8_MAX, Attributes::Status::Id, credsIssuerConfig), // + make_unique>(Id, "closed-limit", 0, UINT16_MAX, Attributes::ClosedLimit::Id, credsIssuerConfig), // + make_unique>(Id, "mode", 0, UINT8_MAX, Attributes::Mode::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "physical-closed-limit", Attributes::PhysicalClosedLimit::Id, credsIssuerConfig), // + make_unique(Id, "motor-step-size", Attributes::MotorStepSize::Id, credsIssuerConfig), // + make_unique(Id, "status", Attributes::Status::Id, credsIssuerConfig), // + make_unique(Id, "closed-limit", Attributes::ClosedLimit::Id, credsIssuerConfig), // + make_unique(Id, "mode", Attributes::Mode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // @@ -20908,33 +13028,47 @@ void registerClusterDoorLock(Commands & commands, CredentialIssuerCommands * cre make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "lock-state", Attributes::LockState::Id, credsIssuerConfig), // - make_unique(Id, "lock-type", Attributes::LockType::Id, credsIssuerConfig), // - make_unique(Id, "actuator-enabled", Attributes::ActuatorEnabled::Id, credsIssuerConfig), // - make_unique(Id, "door-state", Attributes::DoorState::Id, credsIssuerConfig), // - make_unique(Id, "door-open-events", Attributes::DoorOpenEvents::Id, credsIssuerConfig), // - make_unique(Id, "door-closed-events", Attributes::DoorClosedEvents::Id, credsIssuerConfig), // - make_unique(Id, "open-period", Attributes::OpenPeriod::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "door-open-events", 0, UINT32_MAX, Attributes::DoorOpenEvents::Id, + credsIssuerConfig), // + make_unique>(Id, "door-closed-events", 0, UINT32_MAX, Attributes::DoorClosedEvents::Id, + credsIssuerConfig), // + make_unique>(Id, "open-period", 0, UINT16_MAX, Attributes::OpenPeriod::Id, credsIssuerConfig), // + make_unique>(Id, "language", Attributes::Language::Id, credsIssuerConfig), // + make_unique>(Id, "ledsettings", 0, UINT8_MAX, Attributes::LEDSettings::Id, credsIssuerConfig), // + make_unique>(Id, "auto-relock-time", 0, UINT32_MAX, Attributes::AutoRelockTime::Id, + credsIssuerConfig), // + make_unique>(Id, "sound-volume", 0, UINT8_MAX, Attributes::SoundVolume::Id, credsIssuerConfig), // + make_unique>( + Id, "operating-mode", 0, UINT8_MAX, Attributes::OperatingMode::Id, credsIssuerConfig), // + make_unique>(Id, "enable-local-programming", 0, 1, Attributes::EnableLocalProgramming::Id, + credsIssuerConfig), // + make_unique>(Id, "enable-one-touch-locking", 0, 1, Attributes::EnableOneTouchLocking::Id, + credsIssuerConfig), // + make_unique>(Id, "enable-inside-status-led", 0, 1, Attributes::EnableInsideStatusLED::Id, + credsIssuerConfig), // + make_unique>(Id, "enable-privacy-mode-button", 0, 1, Attributes::EnablePrivacyModeButton::Id, + credsIssuerConfig), // + make_unique>>( + Id, "local-programming-features", 0, UINT8_MAX, Attributes::LocalProgrammingFeatures::Id, credsIssuerConfig), // + make_unique>(Id, "wrong-code-entry-limit", 0, UINT8_MAX, Attributes::WrongCodeEntryLimit::Id, + credsIssuerConfig), // + make_unique>(Id, "user-code-temporary-disable-time", 0, UINT8_MAX, + Attributes::UserCodeTemporaryDisableTime::Id, credsIssuerConfig), // + make_unique>(Id, "send-pinover-the-air", 0, 1, Attributes::SendPINOverTheAir::Id, + credsIssuerConfig), // + make_unique>(Id, "require-pinfor-remote-operation", 0, 1, Attributes::RequirePINforRemoteOperation::Id, + credsIssuerConfig), // + make_unique>(Id, "expiring-user-timeout", 0, UINT16_MAX, Attributes::ExpiringUserTimeout::Id, + credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "lock-state", Attributes::LockState::Id, credsIssuerConfig), // + make_unique(Id, "lock-type", Attributes::LockType::Id, credsIssuerConfig), // + make_unique(Id, "actuator-enabled", Attributes::ActuatorEnabled::Id, credsIssuerConfig), // + make_unique(Id, "door-state", Attributes::DoorState::Id, credsIssuerConfig), // + make_unique(Id, "door-open-events", Attributes::DoorOpenEvents::Id, credsIssuerConfig), // + make_unique(Id, "door-closed-events", Attributes::DoorClosedEvents::Id, credsIssuerConfig), // + make_unique(Id, "open-period", Attributes::OpenPeriod::Id, credsIssuerConfig), // make_unique(Id, "number-of-total-users-supported", Attributes::NumberOfTotalUsersSupported::Id, credsIssuerConfig), // make_unique(Id, "number-of-pinusers-supported", Attributes::NumberOfPINUsersSupported::Id, @@ -21062,10 +13196,11 @@ void registerClusterWindowCovering(Commands & commands, CredentialIssuerCommands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "type", Attributes::Type::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "mode", 0, UINT8_MAX, Attributes::Mode::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "type", Attributes::Type::Id, credsIssuerConfig), // make_unique(Id, "physical-closed-limit-lift", Attributes::PhysicalClosedLimitLift::Id, credsIssuerConfig), // make_unique(Id, "physical-closed-limit-tilt", Attributes::PhysicalClosedLimitTilt::Id, @@ -21140,22 +13275,28 @@ void registerClusterBarrierControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "barrier-command-open-events", Attributes::BarrierCommandOpenEvents::Id, credsIssuerConfig), // make_unique(Id, "barrier-command-close-events", Attributes::BarrierCommandCloseEvents::Id, - credsIssuerConfig), // - make_unique(Id, "barrier-open-period", Attributes::BarrierOpenPeriod::Id, credsIssuerConfig), // - make_unique(Id, "barrier-close-period", Attributes::BarrierClosePeriod::Id, credsIssuerConfig), // - make_unique(Id, "barrier-position", Attributes::BarrierPosition::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "barrier-open-period", Attributes::BarrierOpenPeriod::Id, credsIssuerConfig), // + make_unique(Id, "barrier-close-period", Attributes::BarrierClosePeriod::Id, credsIssuerConfig), // + make_unique(Id, "barrier-position", Attributes::BarrierPosition::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "barrier-open-events", 0, UINT16_MAX, Attributes::BarrierOpenEvents::Id, + credsIssuerConfig), // + make_unique>(Id, "barrier-close-events", 0, UINT16_MAX, Attributes::BarrierCloseEvents::Id, + credsIssuerConfig), // + make_unique>(Id, "barrier-command-open-events", 0, UINT16_MAX, + Attributes::BarrierCommandOpenEvents::Id, credsIssuerConfig), // + make_unique>(Id, "barrier-command-close-events", 0, UINT16_MAX, + Attributes::BarrierCommandCloseEvents::Id, credsIssuerConfig), // + make_unique>(Id, "barrier-open-period", 0, UINT16_MAX, Attributes::BarrierOpenPeriod::Id, + credsIssuerConfig), // + make_unique>(Id, "barrier-close-period", 0, UINT16_MAX, Attributes::BarrierClosePeriod::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "barrier-moving-state", Attributes::BarrierMovingState::Id, credsIssuerConfig), // make_unique(Id, "barrier-safety-status", Attributes::BarrierSafetyStatus::Id, credsIssuerConfig), // @@ -21226,26 +13367,30 @@ void registerClusterPumpConfigurationAndControl(Commands & commands, CredentialI make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-pressure", Attributes::MaxPressure::Id, credsIssuerConfig), // - make_unique(Id, "max-speed", Attributes::MaxSpeed::Id, credsIssuerConfig), // - make_unique(Id, "max-flow", Attributes::MaxFlow::Id, credsIssuerConfig), // - make_unique(Id, "min-const-pressure", Attributes::MinConstPressure::Id, credsIssuerConfig), // - make_unique(Id, "max-const-pressure", Attributes::MaxConstPressure::Id, credsIssuerConfig), // - make_unique(Id, "min-comp-pressure", Attributes::MinCompPressure::Id, credsIssuerConfig), // - make_unique(Id, "max-comp-pressure", Attributes::MaxCompPressure::Id, credsIssuerConfig), // - make_unique(Id, "min-const-speed", Attributes::MinConstSpeed::Id, credsIssuerConfig), // - make_unique(Id, "max-const-speed", Attributes::MaxConstSpeed::Id, credsIssuerConfig), // - make_unique(Id, "min-const-flow", Attributes::MinConstFlow::Id, credsIssuerConfig), // - make_unique(Id, "max-const-flow", Attributes::MaxConstFlow::Id, credsIssuerConfig), // - make_unique(Id, "min-const-temp", Attributes::MinConstTemp::Id, credsIssuerConfig), // - make_unique(Id, "max-const-temp", Attributes::MaxConstTemp::Id, credsIssuerConfig), // - make_unique(Id, "pump-status", Attributes::PumpStatus::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "lifetime-running-hours", 0, UINT32_MAX, Attributes::LifetimeRunningHours::Id, credsIssuerConfig), // + make_unique>>( + Id, "lifetime-energy-consumed", 0, UINT32_MAX, Attributes::LifetimeEnergyConsumed::Id, credsIssuerConfig), // + make_unique>( + Id, "operation-mode", 0, UINT8_MAX, Attributes::OperationMode::Id, credsIssuerConfig), // + make_unique>( + Id, "control-mode", 0, UINT8_MAX, Attributes::ControlMode::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-pressure", Attributes::MaxPressure::Id, credsIssuerConfig), // + make_unique(Id, "max-speed", Attributes::MaxSpeed::Id, credsIssuerConfig), // + make_unique(Id, "max-flow", Attributes::MaxFlow::Id, credsIssuerConfig), // + make_unique(Id, "min-const-pressure", Attributes::MinConstPressure::Id, credsIssuerConfig), // + make_unique(Id, "max-const-pressure", Attributes::MaxConstPressure::Id, credsIssuerConfig), // + make_unique(Id, "min-comp-pressure", Attributes::MinCompPressure::Id, credsIssuerConfig), // + make_unique(Id, "max-comp-pressure", Attributes::MaxCompPressure::Id, credsIssuerConfig), // + make_unique(Id, "min-const-speed", Attributes::MinConstSpeed::Id, credsIssuerConfig), // + make_unique(Id, "max-const-speed", Attributes::MaxConstSpeed::Id, credsIssuerConfig), // + make_unique(Id, "min-const-flow", Attributes::MinConstFlow::Id, credsIssuerConfig), // + make_unique(Id, "max-const-flow", Attributes::MaxConstFlow::Id, credsIssuerConfig), // + make_unique(Id, "min-const-temp", Attributes::MinConstTemp::Id, credsIssuerConfig), // + make_unique(Id, "max-const-temp", Attributes::MaxConstTemp::Id, credsIssuerConfig), // + make_unique(Id, "pump-status", Attributes::PumpStatus::Id, credsIssuerConfig), // make_unique(Id, "effective-operation-mode", Attributes::EffectiveOperationMode::Id, credsIssuerConfig), // make_unique(Id, "effective-control-mode", Attributes::EffectiveControlMode::Id, credsIssuerConfig), // @@ -21393,34 +13538,58 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "hvacsystem-type-configuration", 0, UINT8_MAX, + Attributes::HVACSystemTypeConfiguration::Id, credsIssuerConfig), // + make_unique>(Id, "local-temperature-calibration", INT8_MIN, INT8_MAX, + Attributes::LocalTemperatureCalibration::Id, credsIssuerConfig), // + make_unique>(Id, "occupied-cooling-setpoint", INT16_MIN, INT16_MAX, + Attributes::OccupiedCoolingSetpoint::Id, credsIssuerConfig), // + make_unique>(Id, "occupied-heating-setpoint", INT16_MIN, INT16_MAX, + Attributes::OccupiedHeatingSetpoint::Id, credsIssuerConfig), // + make_unique>(Id, "unoccupied-cooling-setpoint", INT16_MIN, INT16_MAX, + Attributes::UnoccupiedCoolingSetpoint::Id, credsIssuerConfig), // + make_unique>(Id, "unoccupied-heating-setpoint", INT16_MIN, INT16_MAX, + Attributes::UnoccupiedHeatingSetpoint::Id, credsIssuerConfig), // + make_unique>(Id, "min-heat-setpoint-limit", INT16_MIN, INT16_MAX, + Attributes::MinHeatSetpointLimit::Id, credsIssuerConfig), // + make_unique>(Id, "max-heat-setpoint-limit", INT16_MIN, INT16_MAX, + Attributes::MaxHeatSetpointLimit::Id, credsIssuerConfig), // + make_unique>(Id, "min-cool-setpoint-limit", INT16_MIN, INT16_MAX, + Attributes::MinCoolSetpointLimit::Id, credsIssuerConfig), // + make_unique>(Id, "max-cool-setpoint-limit", INT16_MIN, INT16_MAX, + Attributes::MaxCoolSetpointLimit::Id, credsIssuerConfig), // + make_unique>(Id, "min-setpoint-dead-band", INT8_MIN, INT8_MAX, Attributes::MinSetpointDeadBand::Id, + credsIssuerConfig), // + make_unique>(Id, "remote-sensing", 0, UINT8_MAX, Attributes::RemoteSensing::Id, + credsIssuerConfig), // + make_unique>( + Id, "control-sequence-of-operation", 0, UINT8_MAX, Attributes::ControlSequenceOfOperation::Id, credsIssuerConfig), // + make_unique>(Id, "system-mode", 0, UINT8_MAX, Attributes::SystemMode::Id, credsIssuerConfig), // + make_unique>(Id, "temperature-setpoint-hold", 0, UINT8_MAX, Attributes::TemperatureSetpointHold::Id, + credsIssuerConfig), // + make_unique>>( + Id, "temperature-setpoint-hold-duration", 0, UINT16_MAX, Attributes::TemperatureSetpointHoldDuration::Id, + credsIssuerConfig), // + make_unique>(Id, "thermostat-programming-operation-mode", 0, UINT8_MAX, + Attributes::ThermostatProgrammingOperationMode::Id, credsIssuerConfig), // + make_unique>>(Id, "occupied-setback", 0, UINT8_MAX, + Attributes::OccupiedSetback::Id, credsIssuerConfig), // + make_unique>>( + Id, "unoccupied-setback", 0, UINT8_MAX, Attributes::UnoccupiedSetback::Id, credsIssuerConfig), // + make_unique>(Id, "emergency-heat-delta", 0, UINT8_MAX, Attributes::EmergencyHeatDelta::Id, + credsIssuerConfig), // + make_unique>(Id, "actype", 0, UINT8_MAX, Attributes::ACType::Id, credsIssuerConfig), // + make_unique>(Id, "accapacity", 0, UINT16_MAX, Attributes::ACCapacity::Id, credsIssuerConfig), // + make_unique>(Id, "acrefrigerant-type", 0, UINT8_MAX, Attributes::ACRefrigerantType::Id, + credsIssuerConfig), // + make_unique>(Id, "accompressor-type", 0, UINT8_MAX, Attributes::ACCompressorType::Id, + credsIssuerConfig), // + make_unique>(Id, "acerror-code", 0, UINT32_MAX, Attributes::ACErrorCode::Id, credsIssuerConfig), // + make_unique>(Id, "aclouver-position", 0, UINT8_MAX, Attributes::ACLouverPosition::Id, + credsIssuerConfig), // + make_unique>(Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "local-temperature", Attributes::LocalTemperature::Id, credsIssuerConfig), // make_unique(Id, "outdoor-temperature", Attributes::OutdoorTemperature::Id, credsIssuerConfig), // @@ -21517,30 +13686,34 @@ void registerClusterFanControl(Commands & commands, CredentialIssuerCommands * c // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "fan-mode", Attributes::FanMode::Id, credsIssuerConfig), // - make_unique(Id, "fan-mode-sequence", Attributes::FanModeSequence::Id, credsIssuerConfig), // - make_unique(Id, "percent-setting", Attributes::PercentSetting::Id, credsIssuerConfig), // - make_unique(Id, "percent-current", Attributes::PercentCurrent::Id, credsIssuerConfig), // - make_unique(Id, "speed-max", Attributes::SpeedMax::Id, credsIssuerConfig), // - make_unique(Id, "speed-setting", Attributes::SpeedSetting::Id, credsIssuerConfig), // - make_unique(Id, "speed-current", Attributes::SpeedCurrent::Id, credsIssuerConfig), // - make_unique(Id, "rock-support", Attributes::RockSupport::Id, credsIssuerConfig), // - make_unique(Id, "rock-setting", Attributes::RockSetting::Id, credsIssuerConfig), // - make_unique(Id, "wind-support", Attributes::WindSupport::Id, credsIssuerConfig), // - make_unique(Id, "wind-setting", Attributes::WindSetting::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "fan-mode", Attributes::FanMode::Id, credsIssuerConfig), // + make_unique(Id, "fan-mode-sequence", Attributes::FanModeSequence::Id, credsIssuerConfig), // + make_unique(Id, "percent-setting", Attributes::PercentSetting::Id, credsIssuerConfig), // + make_unique(Id, "percent-current", Attributes::PercentCurrent::Id, credsIssuerConfig), // + make_unique(Id, "speed-max", Attributes::SpeedMax::Id, credsIssuerConfig), // + make_unique(Id, "speed-setting", Attributes::SpeedSetting::Id, credsIssuerConfig), // + make_unique(Id, "speed-current", Attributes::SpeedCurrent::Id, credsIssuerConfig), // + make_unique(Id, "rock-support", Attributes::RockSupport::Id, credsIssuerConfig), // + make_unique(Id, "rock-setting", Attributes::RockSetting::Id, credsIssuerConfig), // + make_unique(Id, "wind-support", Attributes::WindSupport::Id, credsIssuerConfig), // + make_unique(Id, "wind-setting", Attributes::WindSetting::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "fan-mode", 0, UINT8_MAX, + Attributes::FanMode::Id, credsIssuerConfig), // + make_unique>( + Id, "fan-mode-sequence", 0, UINT8_MAX, Attributes::FanModeSequence::Id, credsIssuerConfig), // + make_unique>>(Id, "percent-setting", 0, UINT8_MAX, + Attributes::PercentSetting::Id, credsIssuerConfig), // + make_unique>>(Id, "speed-setting", 0, UINT8_MAX, + Attributes::SpeedSetting::Id, credsIssuerConfig), // + make_unique>(Id, "rock-setting", 0, UINT8_MAX, Attributes::RockSetting::Id, credsIssuerConfig), // + make_unique>(Id, "wind-setting", 0, UINT8_MAX, Attributes::WindSetting::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "fan-mode", Attributes::FanMode::Id, credsIssuerConfig), // make_unique(Id, "fan-mode-sequence", Attributes::FanModeSequence::Id, credsIssuerConfig), // @@ -21597,15 +13770,21 @@ void registerClusterDehumidificationControl(Commands & commands, CredentialIssue make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "relative-humidity", Attributes::RelativeHumidity::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "rh-dehumidification-setpoint", 0, UINT8_MAX, + Attributes::RhDehumidificationSetpoint::Id, credsIssuerConfig), // + make_unique>(Id, "relative-humidity-mode", 0, UINT8_MAX, Attributes::RelativeHumidityMode::Id, + credsIssuerConfig), // + make_unique>(Id, "dehumidification-lockout", 0, UINT8_MAX, Attributes::DehumidificationLockout::Id, + credsIssuerConfig), // + make_unique>(Id, "dehumidification-hysteresis", 0, UINT8_MAX, + Attributes::DehumidificationHysteresis::Id, credsIssuerConfig), // + make_unique>(Id, "dehumidification-max-cool", 0, UINT8_MAX, Attributes::DehumidificationMaxCool::Id, + credsIssuerConfig), // + make_unique>(Id, "relative-humidity-display", 0, UINT8_MAX, Attributes::RelativeHumidityDisplay::Id, + credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "relative-humidity", Attributes::RelativeHumidity::Id, credsIssuerConfig), // make_unique(Id, "dehumidification-cooling", Attributes::DehumidificationCooling::Id, credsIssuerConfig), // make_unique(Id, "rh-dehumidification-setpoint", Attributes::RhDehumidificationSetpoint::Id, @@ -21657,11 +13836,14 @@ void registerClusterThermostatUserInterfaceConfiguration(Commands & commands, Cr make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "temperature-display-mode", 0, UINT8_MAX, Attributes::TemperatureDisplayMode::Id, + credsIssuerConfig), // + make_unique>(Id, "keypad-lockout", 0, UINT8_MAX, Attributes::KeypadLockout::Id, + credsIssuerConfig), // + make_unique>(Id, "schedule-programming-visibility", 0, UINT8_MAX, + Attributes::ScheduleProgrammingVisibility::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // make_unique(Id, "temperature-display-mode", Attributes::TemperatureDisplayMode::Id, credsIssuerConfig), // make_unique(Id, "keypad-lockout", Attributes::KeypadLockout::Id, credsIssuerConfig), // @@ -21772,26 +13954,38 @@ void registerClusterColorControl(Commands & commands, CredentialIssuerCommands * make_unique(Id, "couple-color-temp-to-level-min-mireds", Attributes::CoupleColorTempToLevelMinMireds::Id, credsIssuerConfig), // make_unique(Id, "start-up-color-temperature-mireds", Attributes::StartUpColorTemperatureMireds::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "options", 0, UINT8_MAX, Attributes::Options::Id, credsIssuerConfig), // + make_unique>(Id, "white-point-x", 0, UINT16_MAX, Attributes::WhitePointX::Id, + credsIssuerConfig), // + make_unique>(Id, "white-point-y", 0, UINT16_MAX, Attributes::WhitePointY::Id, + credsIssuerConfig), // + make_unique>(Id, "color-point-rx", 0, UINT16_MAX, Attributes::ColorPointRX::Id, + credsIssuerConfig), // + make_unique>(Id, "color-point-ry", 0, UINT16_MAX, Attributes::ColorPointRY::Id, + credsIssuerConfig), // + make_unique>>( + Id, "color-point-rintensity", 0, UINT8_MAX, Attributes::ColorPointRIntensity::Id, credsIssuerConfig), // + make_unique>(Id, "color-point-gx", 0, UINT16_MAX, Attributes::ColorPointGX::Id, + credsIssuerConfig), // + make_unique>(Id, "color-point-gy", 0, UINT16_MAX, Attributes::ColorPointGY::Id, + credsIssuerConfig), // + make_unique>>( + Id, "color-point-gintensity", 0, UINT8_MAX, Attributes::ColorPointGIntensity::Id, credsIssuerConfig), // + make_unique>(Id, "color-point-bx", 0, UINT16_MAX, Attributes::ColorPointBX::Id, + credsIssuerConfig), // + make_unique>(Id, "color-point-by", 0, UINT16_MAX, Attributes::ColorPointBY::Id, + credsIssuerConfig), // + make_unique>>( + Id, "color-point-bintensity", 0, UINT8_MAX, Attributes::ColorPointBIntensity::Id, credsIssuerConfig), // + make_unique>(Id, "start-up-color-temperature-mireds", 0, UINT16_MAX, + Attributes::StartUpColorTemperatureMireds::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "current-hue", Attributes::CurrentHue::Id, credsIssuerConfig), // make_unique(Id, "current-saturation", Attributes::CurrentSaturation::Id, credsIssuerConfig), // @@ -21901,27 +14095,36 @@ void registerClusterBallastConfiguration(Commands & commands, CredentialIssuerCo make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "physical-min-level", Attributes::PhysicalMinLevel::Id, credsIssuerConfig), // - make_unique(Id, "physical-max-level", Attributes::PhysicalMaxLevel::Id, credsIssuerConfig), // - make_unique(Id, "ballast-status", Attributes::BallastStatus::Id, credsIssuerConfig), // - make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // - make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // - make_unique(Id, "power-on-level", Attributes::PowerOnLevel::Id, credsIssuerConfig), // - make_unique(Id, "power-on-fade-time", Attributes::PowerOnFadeTime::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "min-level", 0, UINT8_MAX, Attributes::MinLevel::Id, credsIssuerConfig), // + make_unique>(Id, "max-level", 0, UINT8_MAX, Attributes::MaxLevel::Id, credsIssuerConfig), // + make_unique>(Id, "power-on-level", 0, UINT8_MAX, Attributes::PowerOnLevel::Id, + credsIssuerConfig), // + make_unique>(Id, "power-on-fade-time", 0, UINT16_MAX, Attributes::PowerOnFadeTime::Id, + credsIssuerConfig), // + make_unique>(Id, "intrinsic-ballast-factor", 0, UINT8_MAX, Attributes::IntrinsicBallastFactor::Id, + credsIssuerConfig), // + make_unique>(Id, "ballast-factor-adjustment", 0, UINT8_MAX, Attributes::BallastFactorAdjustment::Id, + credsIssuerConfig), // + make_unique>(Id, "lamp-type", Attributes::LampType::Id, credsIssuerConfig), // + make_unique>(Id, "lamp-manufacturer", Attributes::LampManufacturer::Id, + credsIssuerConfig), // + make_unique>(Id, "lamp-rated-hours", 0, UINT32_MAX, Attributes::LampRatedHours::Id, + credsIssuerConfig), // + make_unique>(Id, "lamp-burn-hours", 0, UINT32_MAX, Attributes::LampBurnHours::Id, + credsIssuerConfig), // + make_unique>(Id, "lamp-alarm-mode", 0, UINT8_MAX, Attributes::LampAlarmMode::Id, + credsIssuerConfig), // + make_unique>(Id, "lamp-burn-hours-trip-point", 0, UINT32_MAX, + Attributes::LampBurnHoursTripPoint::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "physical-min-level", Attributes::PhysicalMinLevel::Id, credsIssuerConfig), // + make_unique(Id, "physical-max-level", Attributes::PhysicalMaxLevel::Id, credsIssuerConfig), // + make_unique(Id, "ballast-status", Attributes::BallastStatus::Id, credsIssuerConfig), // + make_unique(Id, "min-level", Attributes::MinLevel::Id, credsIssuerConfig), // + make_unique(Id, "max-level", Attributes::MaxLevel::Id, credsIssuerConfig), // + make_unique(Id, "power-on-level", Attributes::PowerOnLevel::Id, credsIssuerConfig), // + make_unique(Id, "power-on-fade-time", Attributes::PowerOnFadeTime::Id, credsIssuerConfig), // make_unique(Id, "intrinsic-ballast-factor", Attributes::IntrinsicBallastFactor::Id, credsIssuerConfig), // make_unique(Id, "ballast-factor-adjustment", Attributes::BallastFactorAdjustment::Id, @@ -21973,7 +14176,7 @@ void registerClusterIlluminanceMeasurement(Commands & commands, CredentialIssuer make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22018,7 +14221,7 @@ void registerClusterTemperatureMeasurement(Commands & commands, CredentialIssuer make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22067,7 +14270,7 @@ void registerClusterPressureMeasurement(Commands & commands, CredentialIssuerCom make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22116,7 +14319,7 @@ void registerClusterFlowMeasurement(Commands & commands, CredentialIssuerCommand make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22160,7 +14363,7 @@ void registerClusterRelativeHumidityMeasurement(Commands & commands, CredentialI make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22216,25 +14419,34 @@ void registerClusterOccupancySensing(Commands & commands, CredentialIssuerComman make_unique(Id, "physical-contact-unoccupied-to-occupied-delay", Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id, credsIssuerConfig), // make_unique(Id, "physical-contact-unoccupied-to-occupied-threshold", - Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "occupancy", Attributes::Occupancy::Id, credsIssuerConfig), // - make_unique(Id, "occupancy-sensor-type", Attributes::OccupancySensorType::Id, credsIssuerConfig), // + Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "pir-occupied-to-unoccupied-delay", 0, UINT16_MAX, + Attributes::PirOccupiedToUnoccupiedDelay::Id, credsIssuerConfig), // + make_unique>(Id, "pir-unoccupied-to-occupied-delay", 0, UINT16_MAX, + Attributes::PirUnoccupiedToOccupiedDelay::Id, credsIssuerConfig), // + make_unique>(Id, "pir-unoccupied-to-occupied-threshold", 0, UINT8_MAX, + Attributes::PirUnoccupiedToOccupiedThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "ultrasonic-occupied-to-unoccupied-delay", 0, UINT16_MAX, + Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id, credsIssuerConfig), // + make_unique>(Id, "ultrasonic-unoccupied-to-occupied-delay", 0, UINT16_MAX, + Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id, credsIssuerConfig), // + make_unique>(Id, "ultrasonic-unoccupied-to-occupied-threshold", 0, UINT8_MAX, + Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id, credsIssuerConfig), // + make_unique>(Id, "physical-contact-occupied-to-unoccupied-delay", 0, UINT16_MAX, + Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id, credsIssuerConfig), // + make_unique>(Id, "physical-contact-unoccupied-to-occupied-delay", 0, UINT16_MAX, + Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id, credsIssuerConfig), // + make_unique>(Id, "physical-contact-unoccupied-to-occupied-threshold", 0, UINT8_MAX, + Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "occupancy", Attributes::Occupancy::Id, credsIssuerConfig), // + make_unique(Id, "occupancy-sensor-type", Attributes::OccupancySensorType::Id, credsIssuerConfig), // make_unique(Id, "occupancy-sensor-type-bitmap", Attributes::OccupancySensorTypeBitmap::Id, credsIssuerConfig), // make_unique(Id, "pir-occupied-to-unoccupied-delay", Attributes::PirOccupiedToUnoccupiedDelay::Id, @@ -22293,7 +14505,7 @@ void registerClusterCarbonMonoxideConcentrationMeasurement(Commands & commands, make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22337,7 +14549,7 @@ void registerClusterCarbonDioxideConcentrationMeasurement(Commands & commands, C make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22381,7 +14593,7 @@ void registerClusterEthyleneConcentrationMeasurement(Commands & commands, Creden make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22425,7 +14637,7 @@ void registerClusterEthyleneOxideConcentrationMeasurement(Commands & commands, C make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22469,7 +14681,7 @@ void registerClusterHydrogenConcentrationMeasurement(Commands & commands, Creden make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22513,7 +14725,7 @@ void registerClusterHydrogenSulphideConcentrationMeasurement(Commands & commands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22557,7 +14769,7 @@ void registerClusterNitricOxideConcentrationMeasurement(Commands & commands, Cre make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22601,7 +14813,7 @@ void registerClusterNitrogenDioxideConcentrationMeasurement(Commands & commands, make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22645,7 +14857,7 @@ void registerClusterOxygenConcentrationMeasurement(Commands & commands, Credenti make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22689,7 +14901,7 @@ void registerClusterOzoneConcentrationMeasurement(Commands & commands, Credentia make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22733,7 +14945,7 @@ void registerClusterSulfurDioxideConcentrationMeasurement(Commands & commands, C make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22777,7 +14989,7 @@ void registerClusterDissolvedOxygenConcentrationMeasurement(Commands & commands, make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22821,7 +15033,7 @@ void registerClusterBromateConcentrationMeasurement(Commands & commands, Credent make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22865,7 +15077,7 @@ void registerClusterChloraminesConcentrationMeasurement(Commands & commands, Cre make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22909,7 +15121,7 @@ void registerClusterChlorineConcentrationMeasurement(Commands & commands, Creden make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22953,7 +15165,7 @@ void registerClusterFecalColiformAndEColiConcentrationMeasurement(Commands & com make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -22997,7 +15209,7 @@ void registerClusterFluorideConcentrationMeasurement(Commands & commands, Creden make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23041,7 +15253,7 @@ void registerClusterHaloaceticAcidsConcentrationMeasurement(Commands & commands, make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23085,7 +15297,7 @@ void registerClusterTotalTrihalomethanesConcentrationMeasurement(Commands & comm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23129,7 +15341,7 @@ void registerClusterTotalColiformBacteriaConcentrationMeasurement(Commands & com make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23173,7 +15385,7 @@ void registerClusterTurbidityConcentrationMeasurement(Commands & commands, Crede make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23217,7 +15429,7 @@ void registerClusterCopperConcentrationMeasurement(Commands & commands, Credenti make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23261,7 +15473,7 @@ void registerClusterLeadConcentrationMeasurement(Commands & commands, Credential make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23305,7 +15517,7 @@ void registerClusterManganeseConcentrationMeasurement(Commands & commands, Crede make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23349,7 +15561,7 @@ void registerClusterSulfateConcentrationMeasurement(Commands & commands, Credent make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23393,7 +15605,7 @@ void registerClusterBromodichloromethaneConcentrationMeasurement(Commands & comm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23437,7 +15649,7 @@ void registerClusterBromoformConcentrationMeasurement(Commands & commands, Crede make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23481,7 +15693,7 @@ void registerClusterChlorodibromomethaneConcentrationMeasurement(Commands & comm make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23525,7 +15737,7 @@ void registerClusterChloroformConcentrationMeasurement(Commands & commands, Cred make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23569,7 +15781,7 @@ void registerClusterSodiumConcentrationMeasurement(Commands & commands, Credenti make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measured-value", Attributes::MeasuredValue::Id, credsIssuerConfig), // make_unique(Id, "min-measured-value", Attributes::MinMeasuredValue::Id, credsIssuerConfig), // @@ -23610,7 +15822,7 @@ void registerClusterWakeOnLan(Commands & commands, CredentialIssuerCommands * cr make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "macaddress", Attributes::MACAddress::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -23653,7 +15865,7 @@ void registerClusterChannel(Commands & commands, CredentialIssuerCommands * cred make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "channel-list", Attributes::ChannelList::Id, credsIssuerConfig), // make_unique(Id, "lineup", Attributes::Lineup::Id, credsIssuerConfig), // @@ -23695,7 +15907,7 @@ void registerClusterTargetNavigator(Commands & commands, CredentialIssuerCommand make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "target-list", Attributes::TargetList::Id, credsIssuerConfig), // make_unique(Id, "current-target", Attributes::CurrentTarget::Id, credsIssuerConfig), // @@ -23751,7 +15963,7 @@ void registerClusterMediaPlayback(Commands & commands, CredentialIssuerCommands make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "current-state", Attributes::CurrentState::Id, credsIssuerConfig), // make_unique(Id, "start-time", Attributes::StartTime::Id, credsIssuerConfig), // @@ -23800,7 +16012,7 @@ void registerClusterMediaInput(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "input-list", Attributes::InputList::Id, credsIssuerConfig), // make_unique(Id, "current-input", Attributes::CurrentInput::Id, credsIssuerConfig), // @@ -23839,7 +16051,7 @@ void registerClusterLowPower(Commands & commands, CredentialIssuerCommands * cre make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -23876,7 +16088,7 @@ void registerClusterKeypadInput(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -23917,10 +16129,11 @@ void registerClusterContentLauncher(Commands & commands, CredentialIssuerCommand make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "accept-header", Attributes::AcceptHeader::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "supported-streaming-protocols", 0, UINT32_MAX, + Attributes::SupportedStreamingProtocols::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "accept-header", Attributes::AcceptHeader::Id, credsIssuerConfig), // make_unique(Id, "supported-streaming-protocols", Attributes::SupportedStreamingProtocols::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -23961,7 +16174,7 @@ void registerClusterAudioOutput(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "output-list", Attributes::OutputList::Id, credsIssuerConfig), // make_unique(Id, "current-output", Attributes::CurrentOutput::Id, credsIssuerConfig), // @@ -23996,16 +16209,18 @@ void registerClusterApplicationLauncher(Commands & commands, CredentialIssuerCom // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "catalog-list", Attributes::CatalogList::Id, credsIssuerConfig), // - make_unique(Id, "current-app", Attributes::CurrentApp::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "catalog-list", Attributes::CatalogList::Id, credsIssuerConfig), // + make_unique(Id, "current-app", Attributes::CurrentApp::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "current-app", Attributes::CurrentApp::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "catalog-list", Attributes::CatalogList::Id, credsIssuerConfig), // make_unique(Id, "current-app", Attributes::CurrentApp::Id, credsIssuerConfig), // @@ -24051,7 +16266,7 @@ void registerClusterApplicationBasic(Commands & commands, CredentialIssuerComman make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "vendor-name", Attributes::VendorName::Id, credsIssuerConfig), // make_unique(Id, "vendor-id", Attributes::VendorID::Id, credsIssuerConfig), // @@ -24098,7 +16313,7 @@ void registerClusterAccountLogin(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -24137,7 +16352,7 @@ void registerClusterMessaging(Commands & commands, CredentialIssuerCommands * cr make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -24186,7 +16401,7 @@ void registerClusterApplianceIdentification(Commands & commands, CredentialIssue make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "basic-identification", Attributes::BasicIdentification::Id, credsIssuerConfig), // make_unique(Id, "company-name", Attributes::CompanyName::Id, credsIssuerConfig), // @@ -24247,8 +16462,8 @@ void registerClusterMeterIdentification(Commands & commands, CredentialIssuerCom make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "customer-name", Attributes::CustomerName::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "company-name", Attributes::CompanyName::Id, credsIssuerConfig), // make_unique(Id, "meter-type-id", Attributes::MeterTypeId::Id, credsIssuerConfig), // @@ -24297,7 +16512,7 @@ void registerClusterApplianceEventsAndAlert(Commands & commands, CredentialIssue make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -24337,7 +16552,7 @@ void registerClusterApplianceStatistics(Commands & commands, CredentialIssuerCom make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "log-max-size", Attributes::LogMaxSize::Id, credsIssuerConfig), // make_unique(Id, "log-queue-max-size", Attributes::LogQueueMaxSize::Id, credsIssuerConfig), // @@ -24534,21 +16749,29 @@ void registerClusterElectricalMeasurement(Commands & commands, CredentialIssuerC make_unique(Id, "rms-voltage-sag-period-phase-c", Attributes::RmsVoltageSagPeriodPhaseC::Id, credsIssuerConfig), // make_unique(Id, "rms-voltage-swell-period-phase-c", Attributes::RmsVoltageSwellPeriodPhaseC::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "average-rms-voltage-measurement-period", 0, UINT16_MAX, + Attributes::AverageRmsVoltageMeasurementPeriod::Id, credsIssuerConfig), // + make_unique>(Id, "average-rms-under-voltage-counter", 0, UINT16_MAX, + Attributes::AverageRmsUnderVoltageCounter::Id, credsIssuerConfig), // + make_unique>(Id, "rms-extreme-over-voltage-period", 0, UINT16_MAX, + Attributes::RmsExtremeOverVoltagePeriod::Id, credsIssuerConfig), // + make_unique>(Id, "rms-extreme-under-voltage-period", 0, UINT16_MAX, + Attributes::RmsExtremeUnderVoltagePeriod::Id, credsIssuerConfig), // + make_unique>(Id, "rms-voltage-sag-period", 0, UINT16_MAX, Attributes::RmsVoltageSagPeriod::Id, + credsIssuerConfig), // + make_unique>(Id, "rms-voltage-swell-period", 0, UINT16_MAX, Attributes::RmsVoltageSwellPeriod::Id, + credsIssuerConfig), // + make_unique>(Id, "overload-alarms-mask", 0, UINT8_MAX, Attributes::OverloadAlarmsMask::Id, + credsIssuerConfig), // + make_unique>(Id, "ac-overload-alarms-mask", 0, UINT16_MAX, Attributes::AcOverloadAlarmsMask::Id, + credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "measurement-type", Attributes::MeasurementType::Id, credsIssuerConfig), // make_unique(Id, "dc-voltage", Attributes::DcVoltage::Id, credsIssuerConfig), // @@ -24864,117 +17087,186 @@ void registerClusterTestCluster(Commands & commands, CredentialIssuerCommands * make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "boolean", Attributes::Boolean::Id, credsIssuerConfig), // - make_unique(Id, "bitmap8", Attributes::Bitmap8::Id, credsIssuerConfig), // - make_unique(Id, "bitmap16", Attributes::Bitmap16::Id, credsIssuerConfig), // - make_unique(Id, "bitmap32", Attributes::Bitmap32::Id, credsIssuerConfig), // - make_unique(Id, "bitmap64", Attributes::Bitmap64::Id, credsIssuerConfig), // - make_unique(Id, "int8u", Attributes::Int8u::Id, credsIssuerConfig), // - make_unique(Id, "int16u", Attributes::Int16u::Id, credsIssuerConfig), // - make_unique(Id, "int24u", Attributes::Int24u::Id, credsIssuerConfig), // - make_unique(Id, "int32u", Attributes::Int32u::Id, credsIssuerConfig), // - make_unique(Id, "int40u", Attributes::Int40u::Id, credsIssuerConfig), // - make_unique(Id, "int48u", Attributes::Int48u::Id, credsIssuerConfig), // - make_unique(Id, "int56u", Attributes::Int56u::Id, credsIssuerConfig), // - make_unique(Id, "int64u", Attributes::Int64u::Id, credsIssuerConfig), // - make_unique(Id, "int8s", Attributes::Int8s::Id, credsIssuerConfig), // - make_unique(Id, "int16s", Attributes::Int16s::Id, credsIssuerConfig), // - make_unique(Id, "int24s", Attributes::Int24s::Id, credsIssuerConfig), // - make_unique(Id, "int32s", Attributes::Int32s::Id, credsIssuerConfig), // - make_unique(Id, "int40s", Attributes::Int40s::Id, credsIssuerConfig), // - make_unique(Id, "int48s", Attributes::Int48s::Id, credsIssuerConfig), // - make_unique(Id, "int56s", Attributes::Int56s::Id, credsIssuerConfig), // - make_unique(Id, "int64s", Attributes::Int64s::Id, credsIssuerConfig), // - make_unique(Id, "enum8", Attributes::Enum8::Id, credsIssuerConfig), // - make_unique(Id, "enum16", Attributes::Enum16::Id, credsIssuerConfig), // - make_unique(Id, "float-single", Attributes::FloatSingle::Id, credsIssuerConfig), // - make_unique(Id, "float-double", Attributes::FloatDouble::Id, credsIssuerConfig), // - make_unique(Id, "octet-string", Attributes::OctetString::Id, credsIssuerConfig), // - make_unique(Id, "list-int8u", Attributes::ListInt8u::Id, credsIssuerConfig), // - make_unique(Id, "list-octet-string", Attributes::ListOctetString::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "boolean", 0, 1, Attributes::Boolean::Id, credsIssuerConfig), // + make_unique>>( + Id, "bitmap8", 0, UINT8_MAX, Attributes::Bitmap8::Id, credsIssuerConfig), // + make_unique>>( + Id, "bitmap16", 0, UINT16_MAX, Attributes::Bitmap16::Id, credsIssuerConfig), // + make_unique>>( + Id, "bitmap32", 0, UINT32_MAX, Attributes::Bitmap32::Id, credsIssuerConfig), // + make_unique>>( + Id, "bitmap64", 0, UINT64_MAX, Attributes::Bitmap64::Id, credsIssuerConfig), // + make_unique>(Id, "int8u", 0, UINT8_MAX, Attributes::Int8u::Id, credsIssuerConfig), // + make_unique>(Id, "int16u", 0, UINT16_MAX, Attributes::Int16u::Id, credsIssuerConfig), // + make_unique>(Id, "int24u", 0, UINT32_MAX, Attributes::Int24u::Id, credsIssuerConfig), // + make_unique>(Id, "int32u", 0, UINT32_MAX, Attributes::Int32u::Id, credsIssuerConfig), // + make_unique>(Id, "int40u", 0, UINT64_MAX, Attributes::Int40u::Id, credsIssuerConfig), // + make_unique>(Id, "int48u", 0, UINT64_MAX, Attributes::Int48u::Id, credsIssuerConfig), // + make_unique>(Id, "int56u", 0, UINT64_MAX, Attributes::Int56u::Id, credsIssuerConfig), // + make_unique>(Id, "int64u", 0, UINT64_MAX, Attributes::Int64u::Id, credsIssuerConfig), // + make_unique>(Id, "int8s", INT8_MIN, INT8_MAX, Attributes::Int8s::Id, credsIssuerConfig), // + make_unique>(Id, "int16s", INT16_MIN, INT16_MAX, Attributes::Int16s::Id, credsIssuerConfig), // + make_unique>(Id, "int24s", INT32_MIN, INT32_MAX, Attributes::Int24s::Id, credsIssuerConfig), // + make_unique>(Id, "int32s", INT32_MIN, INT32_MAX, Attributes::Int32s::Id, credsIssuerConfig), // + make_unique>(Id, "int40s", INT64_MIN, INT64_MAX, Attributes::Int40s::Id, credsIssuerConfig), // + make_unique>(Id, "int48s", INT64_MIN, INT64_MAX, Attributes::Int48s::Id, credsIssuerConfig), // + make_unique>(Id, "int56s", INT64_MIN, INT64_MAX, Attributes::Int56s::Id, credsIssuerConfig), // + make_unique>(Id, "int64s", INT64_MIN, INT64_MAX, Attributes::Int64s::Id, credsIssuerConfig), // + make_unique>(Id, "enum8", 0, UINT8_MAX, Attributes::Enum8::Id, credsIssuerConfig), // + make_unique>(Id, "enum16", 0, UINT16_MAX, Attributes::Enum16::Id, credsIssuerConfig), // + make_unique>(Id, "float-single", -std::numeric_limits::infinity(), + std::numeric_limits::infinity(), Attributes::FloatSingle::Id, + credsIssuerConfig), // + make_unique>(Id, "float-double", -std::numeric_limits::infinity(), + std::numeric_limits::infinity(), Attributes::FloatDouble::Id, + credsIssuerConfig), // + make_unique>(Id, "octet-string", Attributes::OctetString::Id, credsIssuerConfig), // + make_unique>>(Id, "list-int8u", Attributes::ListInt8u::Id, + credsIssuerConfig), // + make_unique>>( + Id, "list-octet-string", Attributes::ListOctetString::Id, credsIssuerConfig), // + make_unique>>( + Id, "list-struct-octet-string", Attributes::ListStructOctetString::Id, credsIssuerConfig), // + make_unique>(Id, "long-octet-string", Attributes::LongOctetString::Id, credsIssuerConfig), // + make_unique>(Id, "char-string", Attributes::CharString::Id, credsIssuerConfig), // + make_unique>(Id, "long-char-string", Attributes::LongCharString::Id, credsIssuerConfig), // + make_unique>(Id, "epoch-us", 0, UINT64_MAX, Attributes::EpochUs::Id, credsIssuerConfig), // + make_unique>(Id, "epoch-s", 0, UINT32_MAX, Attributes::EpochS::Id, credsIssuerConfig), // + make_unique>(Id, "vendor-id", 0, UINT16_MAX, Attributes::VendorId::Id, credsIssuerConfig), // + make_unique>>( + Id, "list-nullables-and-optionals-struct", Attributes::ListNullablesAndOptionalsStruct::Id, credsIssuerConfig), // + make_unique>(Id, "enum-attr", 0, UINT8_MAX, + Attributes::EnumAttr::Id, credsIssuerConfig), // + make_unique>( + Id, "struct-attr", Attributes::StructAttr::Id, credsIssuerConfig), // + make_unique>(Id, "range-restricted-int8u", 0, UINT8_MAX, Attributes::RangeRestrictedInt8u::Id, + credsIssuerConfig), // + make_unique>(Id, "range-restricted-int8s", INT8_MIN, INT8_MAX, Attributes::RangeRestrictedInt8s::Id, + credsIssuerConfig), // + make_unique>(Id, "range-restricted-int16u", 0, UINT16_MAX, Attributes::RangeRestrictedInt16u::Id, + credsIssuerConfig), // + make_unique>(Id, "range-restricted-int16s", INT16_MIN, INT16_MAX, + Attributes::RangeRestrictedInt16s::Id, credsIssuerConfig), // + make_unique>>( + Id, "list-long-octet-string", Attributes::ListLongOctetString::Id, credsIssuerConfig), // + make_unique>>( + Id, "list-fabric-scoped", Attributes::ListFabricScoped::Id, credsIssuerConfig), // + make_unique>(Id, "timed-write-boolean", 0, 1, Attributes::TimedWriteBoolean::Id, credsIssuerConfig), // + make_unique>(Id, "general-error-boolean", 0, 1, Attributes::GeneralErrorBoolean::Id, + credsIssuerConfig), // + make_unique>(Id, "cluster-error-boolean", 0, 1, Attributes::ClusterErrorBoolean::Id, + credsIssuerConfig), // + make_unique>(Id, "unsupported", 0, 1, Attributes::Unsupported::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-boolean", 0, 1, + Attributes::NullableBoolean::Id, credsIssuerConfig), // + make_unique< + WriteAttribute>>>( + Id, "nullable-bitmap8", 0, UINT8_MAX, Attributes::NullableBitmap8::Id, credsIssuerConfig), // + make_unique< + WriteAttribute>>>( + Id, "nullable-bitmap16", 0, UINT16_MAX, Attributes::NullableBitmap16::Id, credsIssuerConfig), // + make_unique< + WriteAttribute>>>( + Id, "nullable-bitmap32", 0, UINT32_MAX, Attributes::NullableBitmap32::Id, credsIssuerConfig), // + make_unique< + WriteAttribute>>>( + Id, "nullable-bitmap64", 0, UINT64_MAX, Attributes::NullableBitmap64::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int8u", 0, UINT8_MAX, + Attributes::NullableInt8u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int16u", 0, UINT16_MAX, + Attributes::NullableInt16u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int24u", 0, UINT32_MAX, + Attributes::NullableInt24u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int32u", 0, UINT32_MAX, + Attributes::NullableInt32u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int40u", 0, UINT64_MAX, + Attributes::NullableInt40u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int48u", 0, UINT64_MAX, + Attributes::NullableInt48u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int56u", 0, UINT64_MAX, + Attributes::NullableInt56u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int64u", 0, UINT64_MAX, + Attributes::NullableInt64u::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int8s", INT8_MIN, INT8_MAX, + Attributes::NullableInt8s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int16s", INT16_MIN, INT16_MAX, + Attributes::NullableInt16s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int24s", INT32_MIN, INT32_MAX, + Attributes::NullableInt24s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int32s", INT32_MIN, INT32_MAX, + Attributes::NullableInt32s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int40s", INT64_MIN, INT64_MAX, + Attributes::NullableInt40s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int48s", INT64_MIN, INT64_MAX, + Attributes::NullableInt48s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int56s", INT64_MIN, INT64_MAX, + Attributes::NullableInt56s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-int64s", INT64_MIN, INT64_MAX, + Attributes::NullableInt64s::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-enum8", 0, UINT8_MAX, + Attributes::NullableEnum8::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-enum16", 0, UINT16_MAX, + Attributes::NullableEnum16::Id, credsIssuerConfig), // + make_unique>>( + Id, "nullable-float-single", -std::numeric_limits::infinity(), std::numeric_limits::infinity(), + Attributes::NullableFloatSingle::Id, credsIssuerConfig), // + make_unique>>( + Id, "nullable-float-double", -std::numeric_limits::infinity(), std::numeric_limits::infinity(), + Attributes::NullableFloatDouble::Id, credsIssuerConfig), // + make_unique>>( + Id, "nullable-octet-string", Attributes::NullableOctetString::Id, credsIssuerConfig), // + make_unique>>( + Id, "nullable-char-string", Attributes::NullableCharString::Id, credsIssuerConfig), // + make_unique>>( + Id, "nullable-enum-attr", 0, UINT8_MAX, Attributes::NullableEnumAttr::Id, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "nullable-struct", Attributes::NullableStruct::Id, credsIssuerConfig), // + make_unique>>(Id, "nullable-range-restricted-int8u", 0, UINT8_MAX, + Attributes::NullableRangeRestrictedInt8u::Id, + credsIssuerConfig), // + make_unique>>(Id, "nullable-range-restricted-int8s", INT8_MIN, + INT8_MAX, Attributes::NullableRangeRestrictedInt8s::Id, + credsIssuerConfig), // + make_unique>>(Id, "nullable-range-restricted-int16u", 0, UINT16_MAX, + Attributes::NullableRangeRestrictedInt16u::Id, + credsIssuerConfig), // + make_unique>>( + Id, "nullable-range-restricted-int16s", INT16_MIN, INT16_MAX, Attributes::NullableRangeRestrictedInt16s::Id, + credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "boolean", Attributes::Boolean::Id, credsIssuerConfig), // + make_unique(Id, "bitmap8", Attributes::Bitmap8::Id, credsIssuerConfig), // + make_unique(Id, "bitmap16", Attributes::Bitmap16::Id, credsIssuerConfig), // + make_unique(Id, "bitmap32", Attributes::Bitmap32::Id, credsIssuerConfig), // + make_unique(Id, "bitmap64", Attributes::Bitmap64::Id, credsIssuerConfig), // + make_unique(Id, "int8u", Attributes::Int8u::Id, credsIssuerConfig), // + make_unique(Id, "int16u", Attributes::Int16u::Id, credsIssuerConfig), // + make_unique(Id, "int24u", Attributes::Int24u::Id, credsIssuerConfig), // + make_unique(Id, "int32u", Attributes::Int32u::Id, credsIssuerConfig), // + make_unique(Id, "int40u", Attributes::Int40u::Id, credsIssuerConfig), // + make_unique(Id, "int48u", Attributes::Int48u::Id, credsIssuerConfig), // + make_unique(Id, "int56u", Attributes::Int56u::Id, credsIssuerConfig), // + make_unique(Id, "int64u", Attributes::Int64u::Id, credsIssuerConfig), // + make_unique(Id, "int8s", Attributes::Int8s::Id, credsIssuerConfig), // + make_unique(Id, "int16s", Attributes::Int16s::Id, credsIssuerConfig), // + make_unique(Id, "int24s", Attributes::Int24s::Id, credsIssuerConfig), // + make_unique(Id, "int32s", Attributes::Int32s::Id, credsIssuerConfig), // + make_unique(Id, "int40s", Attributes::Int40s::Id, credsIssuerConfig), // + make_unique(Id, "int48s", Attributes::Int48s::Id, credsIssuerConfig), // + make_unique(Id, "int56s", Attributes::Int56s::Id, credsIssuerConfig), // + make_unique(Id, "int64s", Attributes::Int64s::Id, credsIssuerConfig), // + make_unique(Id, "enum8", Attributes::Enum8::Id, credsIssuerConfig), // + make_unique(Id, "enum16", Attributes::Enum16::Id, credsIssuerConfig), // + make_unique(Id, "float-single", Attributes::FloatSingle::Id, credsIssuerConfig), // + make_unique(Id, "float-double", Attributes::FloatDouble::Id, credsIssuerConfig), // + make_unique(Id, "octet-string", Attributes::OctetString::Id, credsIssuerConfig), // + make_unique(Id, "list-int8u", Attributes::ListInt8u::Id, credsIssuerConfig), // + make_unique(Id, "list-octet-string", Attributes::ListOctetString::Id, credsIssuerConfig), // make_unique(Id, "list-struct-octet-string", Attributes::ListStructOctetString::Id, credsIssuerConfig), // make_unique(Id, "long-octet-string", Attributes::LongOctetString::Id, credsIssuerConfig), // @@ -25060,7 +17352,7 @@ void registerClusterAny(Commands & commands, CredentialIssuerCommands * credsIss commands_list clusterCommands = { make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique>(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), //