diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 7f5a419fe7dd25..a396695715b774 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -34,8 +34,10 @@ executable("chip-tool") { "commands/discover/DiscoverCommand.cpp", "commands/discover/DiscoverCommissionablesCommand.cpp", "commands/discover/DiscoverCommissionersCommand.cpp", - "commands/pairing/CommissionedListCommand.cpp", - "commands/pairing/CommissionedListCommand.h", + + # TODO - enable CommissionedListCommand once DNS Cache is implemented + # "commands/pairing/CommissionedListCommand.cpp", + # "commands/pairing/CommissionedListCommand.h", "commands/pairing/PairingCommand.cpp", "commands/payload/AdditionalDataParseCommand.cpp", "commands/payload/SetupPayloadParseCommand.cpp", diff --git a/examples/chip-tool/commands/clusters/ModelCommand.cpp b/examples/chip-tool/commands/clusters/ModelCommand.cpp index 25fdfa8ec7a697..30816eb6cceaf8 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.cpp +++ b/examples/chip-tool/commands/clusters/ModelCommand.cpp @@ -36,7 +36,7 @@ CHIP_ERROR ModelCommand::RunCommand() return err; } -void ModelCommand::OnDeviceConnectedFn(void * context, chip::Controller::Device * device) +void ModelCommand::OnDeviceConnectedFn(void * context, ChipDevice * device) { ModelCommand * command = reinterpret_cast(context); VerifyOrReturn(command != nullptr, diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index c70d35477f80c4..b7135a5dc49ca8 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -31,7 +31,7 @@ class ModelCommand : public CHIPCommand { public: - using ChipDevice = ::chip::Controller::Device; + using ChipDevice = ::chip::DeviceProxy; ModelCommand(const char * commandName) : CHIPCommand(commandName), mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), @@ -57,6 +57,6 @@ class ModelCommand : public CHIPCommand static void OnDeviceConnectedFn(void * context, ChipDevice * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); - chip::Callback::Callback mOnDeviceConnectedCallback; - chip::Callback::Callback mOnDeviceConnectionFailureCallback; + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; }; diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index 9bb5345e8f47fe..51f3aab0994948 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -28,10 +28,9 @@ class PersistentStorage; class CHIPCommand : public Command { public: - using ChipDevice = ::chip::Controller::Device; + using ChipDevice = ::chip::DeviceProxy; using ChipDeviceCommissioner = ::chip::Controller::DeviceCommissioner; using ChipDeviceController = ::chip::Controller::DeviceController; - using ChipSerializedDevice = ::chip::Controller::SerializedDevice; using IPAddress = ::chip::Inet::IPAddress; using NodeId = ::chip::NodeId; using PeerAddress = ::chip::Transport::PeerAddress; diff --git a/examples/chip-tool/commands/pairing/Commands.h b/examples/chip-tool/commands/pairing/Commands.h index 3b7ba676271605..8b3dc38b241314 100644 --- a/examples/chip-tool/commands/pairing/Commands.h +++ b/examples/chip-tool/commands/pairing/Commands.h @@ -170,7 +170,8 @@ void registerCommandsPairing(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), + // TODO - enable CommissionedListCommand once DNS Cache is implemented + // make_unique(), }; commands.Register(clusterName, clusterCommands); diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index efd4581ca57211..20fa405af043ad 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -89,7 +89,7 @@ CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId) return err; } -void PairingCommand::OnDeviceConnectedFn(void * context, chip::Controller::Device * device) +void PairingCommand::OnDeviceConnectedFn(void * context, chip::DeviceProxy * device) { PairingCommand * command = reinterpret_cast(context); command->OpenCommissioningWindow(); @@ -248,7 +248,7 @@ CHIP_ERROR PairingCommand::SetupNetwork() break; case PairingNetworkType::WiFi: case PairingNetworkType::Thread: - err = mController.GetDevice(mNodeId, &mDevice); + err = mController.GetDeviceBeingCommissioned(mNodeId, &mDevice); VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(chipTool, "Setup failure! No pairing for device: %" PRIu64, mNodeId)); mCluster.Associate(mDevice, mEndpointId); diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index c3c23cfffffefa..2dc38bac1c35af 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -210,15 +210,15 @@ class PairingCommand : public CHIPCommand, chip::Callback::Callback * mOnAddWiFiNetworkCallback = nullptr; chip::Callback::Callback * mOnEnableNetworkCallback = nullptr; chip::Callback::Callback * mOnFailureCallback = nullptr; - ChipDevice * mDevice; + chip::CommissioneeDeviceProxy * mDevice; chip::Controller::NetworkCommissioningCluster mCluster; chip::EndpointId mEndpointId = 0; - static void OnDeviceConnectedFn(void * context, chip::Controller::Device * device); + static void OnDeviceConnectedFn(void * context, chip::DeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); static void OnOpenCommissioningWindowResponse(void * context, NodeId deviceId, CHIP_ERROR status, chip::SetupPayload payload); - chip::Callback::Callback mOnDeviceConnectedCallback; - chip::Callback::Callback mOnDeviceConnectionFailureCallback; + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; chip::Callback::Callback mOnOpenCommissioningWindowCallback; }; diff --git a/examples/chip-tool/commands/reporting/ReportingCommand.cpp b/examples/chip-tool/commands/reporting/ReportingCommand.cpp index 2a6ad8b15d430d..b0be63f6bf5500 100644 --- a/examples/chip-tool/commands/reporting/ReportingCommand.cpp +++ b/examples/chip-tool/commands/reporting/ReportingCommand.cpp @@ -35,7 +35,7 @@ CHIP_ERROR ReportingCommand::RunCommand() return err; } -void ReportingCommand::OnDeviceConnectedFn(void * context, chip::Controller::Device * device) +void ReportingCommand::OnDeviceConnectedFn(void * context, chip::DeviceProxy * device) { ReportingCommand * command = reinterpret_cast(context); VerifyOrReturn(command != nullptr, diff --git a/examples/chip-tool/commands/reporting/ReportingCommand.h b/examples/chip-tool/commands/reporting/ReportingCommand.h index aba585685f81af..0aa5169f4f2e95 100644 --- a/examples/chip-tool/commands/reporting/ReportingCommand.h +++ b/examples/chip-tool/commands/reporting/ReportingCommand.h @@ -48,9 +48,9 @@ class ReportingCommand : public CHIPCommand NodeId mNodeId; uint8_t mEndPointId; - static void OnDeviceConnectedFn(void * context, chip::Controller::Device * device); + static void OnDeviceConnectedFn(void * context, chip::DeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); - chip::Callback::Callback mOnDeviceConnectedCallback; - chip::Callback::Callback mOnDeviceConnectionFailureCallback; + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; }; diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index e8d19276ee61d9..48d031bfac1af4 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -23,7 +23,7 @@ CHIP_ERROR TestCommand::RunCommand() return mController.GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); } -void TestCommand::OnDeviceConnectedFn(void * context, chip::Controller::Device * device) +void TestCommand::OnDeviceConnectedFn(void * context, chip::DeviceProxy * device) { ChipLogProgress(chipTool, " **** Test Setup: Device Connected\n"); auto * command = static_cast(context); diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 25eaaa5e5c9506..0e1c8ea9eb9b93 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -53,7 +53,7 @@ class TestCommand : public CHIPCommand ChipDevice * mDevice; chip::NodeId mNodeId; - static void OnDeviceConnectedFn(void * context, chip::Controller::Device * device); + static void OnDeviceConnectedFn(void * context, chip::DeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); static void OnWaitForMsFn(chip::System::Layer * systemLayer, void * context); @@ -230,8 +230,8 @@ class TestCommand : public CHIPCommand return false; } - chip::Callback::Callback mOnDeviceConnectedCallback; - chip::Callback::Callback mOnDeviceConnectionFailureCallback; + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; void Wait() { diff --git a/examples/ota-requestor-app/linux/BUILD.gn b/examples/ota-requestor-app/linux/BUILD.gn index 72f31fa74dd2d4..2d698377703640 100644 --- a/examples/ota-requestor-app/linux/BUILD.gn +++ b/examples/ota-requestor-app/linux/BUILD.gn @@ -21,7 +21,6 @@ executable("chip-ota-requestor-app") { deps = [ "${chip_root}/examples/ota-requestor-app/ota-requestor-common", "${chip_root}/examples/platform/linux:app-main", - "${chip_root}/src/app/device", "${chip_root}/src/app/server", "${chip_root}/src/lib", ] diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index ae16b33848f535..8831810a607532 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -18,8 +18,13 @@ #include #include -#include +#include #include +#include +#include +#include +#include +#include #include #include #include @@ -31,9 +36,13 @@ using chip::ByteSpan; using chip::CharSpan; +using chip::DeviceProxy; using chip::EndpointId; using chip::FabricIndex; using chip::NodeId; +using chip::OnDeviceConnected; +using chip::OnDeviceConnectionFailure; +using chip::PeerId; using chip::Server; using chip::VendorId; using chip::bdx::TransferSession; @@ -43,21 +52,19 @@ using chip::System::Layer; using chip::Transport::PeerAddress; using namespace chip::ArgParser; using namespace chip::Messaging; -using namespace chip::app::device; using namespace chip::app::Clusters::OtaSoftwareUpdateProvider::Commands; void OnQueryImageResponse(void * context, const QueryImageResponse::DecodableType & response); void OnQueryImageFailure(void * context, EmberAfStatus status); -void OnConnected(void * context, OperationalDeviceProxy * operationalDeviceProxy); -void OnConnectionFailure(void * context, OperationalDeviceProxy * operationalDeviceProxy, CHIP_ERROR error); +void OnConnected(void * context, chip::DeviceProxy * deviceProxy); +void OnConnectionFailure(void * context, NodeId deviceId, CHIP_ERROR error); bool HandleOptions(const char * aProgram, OptionSet * aOptions, int aIdentifier, const char * aName, const char * aValue); // TODO: would be nicer to encapsulate these globals and the callbacks in some sort of class -OperationalDeviceProxy gOperationalDeviceProxy; ExchangeContext * exchangeCtx = nullptr; BdxDownloader bdxDownloader; -Callback mOnConnectedCallback(OnConnected, nullptr); -Callback mOnConnectionFailureCallback(OnConnectionFailure, nullptr); +Callback mOnConnectedCallback(OnConnected, nullptr); +Callback mOnConnectionFailureCallback(OnConnectionFailure, nullptr); constexpr uint16_t kOptionProviderNodeId = 'n'; constexpr uint16_t kOptionProviderFabricIndex = 'f'; @@ -117,9 +124,11 @@ void OnQueryImageResponse(void * context, const QueryImageResponse::DecodableTyp initOptions.FileDesLength = static_cast(strlen(testFileDes)); initOptions.FileDesignator = reinterpret_cast(testFileDes); + chip::OperationalDeviceProxy * operationalDeviceProxy = Server::GetInstance().GetOperationalDeviceProxy(); + if (operationalDeviceProxy != nullptr) { - chip::Messaging::ExchangeManager * exchangeMgr = gOperationalDeviceProxy.GetDevice().GetExchangeManager(); - chip::Optional session = gOperationalDeviceProxy.GetDevice().GetSecureSession(); + chip::Messaging::ExchangeManager * exchangeMgr = operationalDeviceProxy->GetExchangeManager(); + chip::Optional session = operationalDeviceProxy->GetSecureSession(); if (exchangeMgr != nullptr && session.HasValue()) { exchangeCtx = exchangeMgr->NewContext(session.Value(), &bdxDownloader); @@ -144,7 +153,7 @@ void OnQueryImageFailure(void * context, EmberAfStatus status) ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); } -void OnConnected(void * context, OperationalDeviceProxy * operationalDeviceProxy) +void OnConnected(void * context, chip::DeviceProxy * deviceProxy) { CHIP_ERROR err = CHIP_NO_ERROR; chip::Controller::OtaSoftwareUpdateProviderCluster cluster; @@ -161,7 +170,7 @@ void OnConnected(void * context, OperationalDeviceProxy * operationalDeviceProxy constexpr bool kExampleClientCanConsent = false; ByteSpan metadata; - err = cluster.Associate(&(operationalDeviceProxy->GetDevice()), kOtaProviderEndpoint); + err = cluster.Associate(deviceProxy, kOtaProviderEndpoint); if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Associate() failed: %" CHIP_ERROR_FORMAT, err.Format()); @@ -183,9 +192,9 @@ void OnConnected(void * context, OperationalDeviceProxy * operationalDeviceProxy } } -void OnConnectionFailure(void * context, OperationalDeviceProxy * operationalDeviceProxy, CHIP_ERROR error) +void OnConnectionFailure(void * context, NodeId deviceId, CHIP_ERROR error) { - ChipLogError(SoftwareUpdate, "failed to connect: %" CHIP_ERROR_FORMAT, error.Format()); + ChipLogError(SoftwareUpdate, "failed to connect to 0x%" PRIX64 ": %" CHIP_ERROR_FORMAT, deviceId, error.Format()); } bool HandleOptions(const char * aProgram, OptionSet * aOptions, int aIdentifier, const char * aName, const char * aValue) @@ -245,24 +254,32 @@ bool HandleOptions(const char * aProgram, OptionSet * aOptions, int aIdentifier, void SendQueryImageCommand(chip::NodeId peerNodeId = providerNodeId, chip::FabricIndex peerFabricIndex = providerFabricIndex) { - // Explicitly calling UpdateAddress() should not be needed once OperationalDeviceProxy can resolve IP address from node ID and - // fabric index - IPAddress ipAddr; - IPAddress::FromString(ipAddress, ipAddr); - PeerAddress addr = PeerAddress::UDP(ipAddr, CHIP_PORT); - gOperationalDeviceProxy.UpdateAddress(addr); - - Server * server = &(Server::GetInstance()); - OperationalDeviceProxyInitParams initParams = { + Server * server = &(Server::GetInstance()); + chip::DeviceProxyInitParams initParams = { .sessionManager = &(server->GetSecureSessionManager()), .exchangeMgr = &(server->GetExchangeManager()), .idAllocator = &(server->GetSessionIDAllocator()), - .fabricsTable = &(server->GetFabricTable()), + .fabricInfo = server->GetFabricTable().FindFabricWithIndex(providerFabricIndex), + // TODO: Determine where this should be instantiated + .imDelegate = chip::Platform::New(), }; + chip::OperationalDeviceProxy * operationalDeviceProxy = + new chip::OperationalDeviceProxy(initParams, PeerId().SetNodeId(providerNodeId)); + server->SetOperationalDeviceProxy(operationalDeviceProxy); + + // Explicitly calling UpdateDeviceData() should not be needed once OperationalDeviceProxy can resolve IP address from node ID + // and fabric index + IPAddress ipAddr; + IPAddress::FromString(ipAddress, ipAddr); + PeerAddress addr = PeerAddress::UDP(ipAddr, CHIP_PORT); + uint32_t idleInterval; + uint32_t activeInterval; + operationalDeviceProxy->GetMRPIntervals(idleInterval, activeInterval); + operationalDeviceProxy->UpdateDeviceData(addr, idleInterval, activeInterval); + CHIP_ERROR err = CHIP_NO_ERROR; - gOperationalDeviceProxy.Init(peerNodeId, peerFabricIndex, initParams); - err = gOperationalDeviceProxy.Connect(&mOnConnectedCallback, &mOnConnectionFailureCallback); + err = operationalDeviceProxy->Connect(&mOnConnectedCallback, &mOnConnectionFailureCallback); if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Cannot establish connection to peer device: %" CHIP_ERROR_FORMAT, err.Format()); diff --git a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp b/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp index e3164884823c44..ce69fadfa6cb10 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp +++ b/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp @@ -18,19 +18,8 @@ #include -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include - -using chip::FabricInfo; ExampleOTARequestor ExampleOTARequestor::sInstance; @@ -53,9 +42,8 @@ ExampleOTARequestor::ExampleOTARequestor() mProviderFabricIndex = chip::kUndefinedFabricIndex; } -void ExampleOTARequestor::Init(chip::Controller::ControllerDeviceInitParams connectParams, uint32_t startDelayMs) +void ExampleOTARequestor::Init(uint32_t startDelayMs) { - mConnectParams = connectParams; mOtaStartDelayMs = startDelayMs; } @@ -128,14 +116,3 @@ void ExampleOTARequestor::StartDelayTimerHandler(chip::System::Layer * systemLay VerifyOrReturn(appState != nullptr); static_cast(appState)->ConnectToProvider(); } - -chip::FabricInfo * ExampleOTARequestor::GetProviderFabricInfo() -{ - if (mConnectParams.fabricsTable == nullptr) - { - ChipLogError(SoftwareUpdate, "FabricTable is null!"); - return nullptr; - } - - return mConnectParams.fabricsTable->FindFabricWithIndex(mProviderFabricIndex); -} diff --git a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h b/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h index 4cdcc2eea2297a..9e1675e40be0e1 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h +++ b/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h @@ -19,11 +19,9 @@ #pragma once #include -#include -#include -#include -#include -#include +#include +#include +#include // An example implementation for how an application might handle receiving an AnnounceOTAProvider command. In this case, the // AnnounceOTAProvider command will be used as a trigger to send a QueryImage command and begin the OTA process. This class also @@ -33,7 +31,7 @@ class ExampleOTARequestor public: static ExampleOTARequestor & GetInstance() { return sInstance; } - void Init(chip::Controller::ControllerDeviceInitParams connectParams, uint32_t startDelayMs); + void Init(uint32_t startDelayMs); EmberAfStatus HandleAnnounceOTAProvider( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, @@ -47,12 +45,9 @@ class ExampleOTARequestor static void StartDelayTimerHandler(chip::System::Layer * systemLayer, void * appState); void ConnectToProvider(); - chip::FabricInfo * GetProviderFabricInfo(); static ExampleOTARequestor sInstance; - chip::Controller::Device mProviderDevice; - chip::Controller::ControllerDeviceInitParams mConnectParams; chip::NodeId mProviderNodeId; chip::FabricIndex mProviderFabricIndex; uint32_t mOtaStartDelayMs; diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index 305c1434a93e6e..7a1e18e67e30be 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -37,13 +37,13 @@ using chip::ArgParser::HelpOptions; using chip::ArgParser::OptionDef; using chip::ArgParser::OptionSet; -struct DeviceType +struct TVExampleDeviceType { const char * name; uint16_t id; }; -constexpr DeviceType kKnownDeviceTypes[] = { { "video-player", 35 }, { "dimmable-light", 257 } }; +constexpr TVExampleDeviceType kKnownDeviceTypes[] = { { "video-player", 35 }, { "dimmable-light", 257 } }; constexpr int kKnownDeviceTypesCount = sizeof kKnownDeviceTypes / sizeof *kKnownDeviceTypes; constexpr uint16_t kOptionDeviceType = 't'; constexpr uint16_t kCommissioningWindowTimeoutInSec = 3 * 60; diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 86aba27dd1de4c..05c460035c7125 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -40,6 +40,8 @@ static_library("app") { "Command.h", "CommandHandler.cpp", "CommandSender.cpp", + "DeviceProxy.cpp", + "DeviceProxy.h", "EventManagement.cpp", "InteractionModelEngine.cpp", "MessageDef/ArrayBuilder.cpp", @@ -106,6 +108,8 @@ static_library("app") { "MessageDef/TimedRequestMessage.cpp", "MessageDef/WriteRequestMessage.cpp", "MessageDef/WriteResponseMessage.cpp", + "OperationalDeviceProxy.cpp", + "OperationalDeviceProxy.h", "ReadClient.cpp", "ReadHandler.cpp", "WriteClient.cpp", @@ -125,6 +129,7 @@ static_library("app") { public_deps = [ ":app_buildconfig", + "${chip_root}/src/app/util:device_callbacks_manager", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", "${chip_root}/src/protocols/secure_channel", diff --git a/src/controller/DeviceControllerInteractionModelDelegate.h b/src/app/DeviceControllerInteractionModelDelegate.h similarity index 53% rename from src/controller/DeviceControllerInteractionModelDelegate.h rename to src/app/DeviceControllerInteractionModelDelegate.h index 929d8eddfe3162..01a61173a15306 100644 --- a/src/controller/DeviceControllerInteractionModelDelegate.h +++ b/src/app/DeviceControllerInteractionModelDelegate.h @@ -4,7 +4,8 @@ #include #include -#include +#include +#include namespace chip { namespace Controller { @@ -22,22 +23,78 @@ class DeviceControllerInteractionModelDelegate : public chip::app::ReadClient::C { public: void OnResponse(app::CommandSender * apCommandSender, const app::ConcreteCommandPath & aPath, - const chip::app::StatusIB & aStatus, TLV::TLVReader * aData) override; + const chip::app::StatusIB & aStatus, TLV::TLVReader * aData) override + { + // Generally IM has more detailed errors than ember library, here we always use the, the actual handling of the + // commands should implement full IMDelegate. + // #6308 By implement app side IM delegate, we should be able to accept detailed error codes. + // Note: The IMDefaultResponseCallback is a bridge to the old CallbackMgr before IM is landed, so it still accepts + // EmberAfStatus instead of IM status code. + if (aData != nullptr) + { + chip::app::DispatchSingleClusterResponseCommand(aPath, *aData, apCommandSender); + } + else + { + IMDefaultResponseCallback(apCommandSender, EMBER_ZCL_STATUS_SUCCESS); + } + } + void OnError(const app::CommandSender * apCommandSender, const chip::app::StatusIB & aStatus, - CHIP_ERROR aProtocolError) override; - void OnDone(app::CommandSender * apCommandSender) override; + CHIP_ERROR aProtocolError) override + { + // The IMDefaultResponseCallback started out life as an Ember function, so it only accepted + // Ember status codes. Consequently, let's convert the IM code over to a meaningful Ember status before dispatching. + // + // This however, results in loss (aError is completely discarded). When full cluster-specific status codes are implemented + // as well, this will be an even bigger problem. + // + // For now, #10331 tracks this issue. + IMDefaultResponseCallback(apCommandSender, app::ToEmberAfStatus(aStatus.mStatus)); + } + + void OnDone(app::CommandSender * apCommandSender) override { return chip::Platform::Delete(apCommandSender); } void OnResponse(const app::WriteClient * apWriteClient, const app::ConcreteAttributePath & aPath, - app::StatusIB attributeStatus) override; - void OnError(const app::WriteClient * apWriteClient, CHIP_ERROR aError) override; - void OnDone(app::WriteClient * apWriteClient) override; + app::StatusIB attributeStatus) override + { + IMWriteResponseCallback(apWriteClient, attributeStatus.mStatus); + } + + void OnError(const app::WriteClient * apWriteClient, CHIP_ERROR aError) override + { + IMWriteResponseCallback(apWriteClient, Protocols::InteractionModel::Status::Failure); + } + + void OnDone(app::WriteClient * apWriteClient) override {} void OnEventData(const app::ReadClient * apReadClient, TLV::TLVReader & aEventList) override {} + void OnAttributeData(const app::ReadClient * apReadClient, const app::ConcreteAttributePath & aPath, TLV::TLVReader * apData, - const app::StatusIB & aStatus) override; - void OnSubscriptionEstablished(const app::ReadClient * apReadClient) override; - void OnError(const app::ReadClient * apReadClient, CHIP_ERROR aError) override; - void OnDone(app::ReadClient * apReadClient) override; + const app::StatusIB & aStatus) override + { + IMReadReportAttributesResponseCallback(apReadClient, &aPath, apData, aStatus.mStatus); + } + + void OnSubscriptionEstablished(const app::ReadClient * apReadClient) override + { + IMSubscribeResponseCallback(apReadClient, EMBER_ZCL_STATUS_SUCCESS); + } + + void OnError(const app::ReadClient * apReadClient, CHIP_ERROR aError) override + { + app::ClusterInfo path; + path.mNodeId = apReadClient->GetPeerNodeId(); + IMReadReportAttributesResponseCallback(apReadClient, nullptr, nullptr, Protocols::InteractionModel::Status::Failure); + } + + void OnDone(app::ReadClient * apReadClient) override + { + if (apReadClient->IsSubscriptionType()) + { + this->FreeAttributePathParam(reinterpret_cast(apReadClient)); + } + } // TODO: FreeAttributePathParam and AllocateAttributePathParam are used by CHIPDevice.cpp for getting a long-live attribute path // object. diff --git a/src/app/DeviceProxy.cpp b/src/app/DeviceProxy.cpp new file mode 100644 index 00000000000000..3c7c6b1f84bfd1 --- /dev/null +++ b/src/app/DeviceProxy.cpp @@ -0,0 +1,168 @@ +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * This file contains implementation of Device class. The objects of this + * class will be used by Controller applications to interact with CHIP + * devices. The class provides mechanism to construct, send and receive + * messages to and from the corresponding CHIP devices. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip::Callback; + +namespace chip { + +CHIP_ERROR DeviceProxy::SendCommands(app::CommandSender * commandObj) +{ + VerifyOrReturnLogError(IsSecureConnected(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(commandObj != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + return commandObj->SendCommandRequest(GetSecureSession().Value()); +} + +void DeviceProxy::AddIMResponseHandler(void * commandObj, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, app::TLVDataFilter tlvDataFilter) +{ + // Interaction model uses the object instead of a sequence number as the identifier of transactions. + // Since the objects can be identified by its pointer which fits into a uint64 value (the type of NodeId), we use it for the + // "node id" field in callback manager. + static_assert(std::is_same::value, "chip::NodeId is not uint64_t"); + chip::NodeId transactionId = reinterpret_cast(commandObj); + mCallbacksMgr.AddResponseCallback(transactionId, 0 /* seqNum, always 0 for IM before #6559 */, onSuccessCallback, + onFailureCallback, tlvDataFilter); +} + +void DeviceProxy::CancelIMResponseHandler(void * commandObj) +{ + // Interaction model uses the object instead of a sequence number as the identifier of transactions. + // Since the objects can be identified by its pointer which fits into a uint64 value (the type of NodeId), we use it for the + // "node id" field in callback manager. + static_assert(std::is_same::value, "chip::NodeId is not uint64_t"); + chip::NodeId transactionId = reinterpret_cast(commandObj); + mCallbacksMgr.CancelResponseCallback(transactionId, 0 /* seqNum, always 0 for IM before #6559 */); +} + +void DeviceProxy::AddReportHandler(EndpointId endpoint, ClusterId cluster, AttributeId attribute, + Callback::Cancelable * onReportCallback, app::TLVDataFilter tlvDataFilter) +{ + mCallbacksMgr.AddReportCallback(GetDeviceId(), endpoint, cluster, attribute, onReportCallback, tlvDataFilter); +} + +CHIP_ERROR DeviceProxy::SendReadAttributeRequest(app::AttributePathParams aPath, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, app::TLVDataFilter aTlvDataFilter) +{ + VerifyOrReturnLogError(IsSecureConnected(), CHIP_ERROR_INCORRECT_STATE); + + app::ReadClient * readClient = nullptr; + ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->NewReadClient( + &readClient, app::ReadClient::InteractionType::Read, GetInteractionModelDelegate())); + + if (onSuccessCallback != nullptr || onFailureCallback != nullptr) + { + AddIMResponseHandler(readClient, onSuccessCallback, onFailureCallback, aTlvDataFilter); + } + // The application context is used to identify different requests from client application the type of it is intptr_t, here we + // use the seqNum. + chip::app::ReadPrepareParams readPrepareParams(GetSecureSession().Value()); + readPrepareParams.mpAttributePathParamsList = &aPath; + readPrepareParams.mAttributePathParamsListSize = 1; + + CHIP_ERROR err = readClient->SendReadRequest(readPrepareParams); + + if (err != CHIP_NO_ERROR) + { + CancelIMResponseHandler(readClient); + } + return err; +} + +CHIP_ERROR DeviceProxy::SendSubscribeAttributeRequest(app::AttributePathParams aPath, uint16_t mMinIntervalFloorSeconds, + uint16_t mMaxIntervalCeilingSeconds, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + VerifyOrReturnLogError(IsSecureConnected(), CHIP_ERROR_INCORRECT_STATE); + + uint8_t seqNum = GetNextSequenceNumber(); + + app::AttributePathParams * path = GetInteractionModelDelegate()->AllocateAttributePathParam(1, seqNum); + + VerifyOrReturnError(path != nullptr, CHIP_ERROR_NO_MEMORY); + + *path = aPath; + + app::ReadClient * readClient = nullptr; + ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->NewReadClient( + &readClient, app::ReadClient::InteractionType::Subscribe, GetInteractionModelDelegate())); + + // The application context is used to identify different requests from client application the type of it is intptr_t, here we + // use the seqNum. + VerifyOrReturnError(GetSecureSession().HasValue(), CHIP_ERROR_INCORRECT_STATE); + app::ReadPrepareParams params(GetSecureSession().Value()); + params.mpAttributePathParamsList = path; + params.mAttributePathParamsListSize = 1; + params.mMinIntervalFloorSeconds = mMinIntervalFloorSeconds; + params.mMaxIntervalCeilingSeconds = mMaxIntervalCeilingSeconds; + params.mKeepSubscriptions = false; + + CHIP_ERROR err = readClient->SendSubscribeRequest(params); + if (err != CHIP_NO_ERROR) + { + GetInteractionModelDelegate()->FreeAttributePathParam(reinterpret_cast(readClient)); + readClient->Shutdown(); + return err; + } + + if (onSuccessCallback != nullptr || onFailureCallback != nullptr) + { + AddIMResponseHandler(readClient, onSuccessCallback, onFailureCallback); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceProxy::SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + VerifyOrReturnLogError(IsSecureConnected(), CHIP_ERROR_INCORRECT_STATE); + + CHIP_ERROR err = CHIP_NO_ERROR; + + app::WriteClient * writeClient = aHandle.Get(); + + if (onSuccessCallback != nullptr || onFailureCallback != nullptr) + { + AddIMResponseHandler(writeClient, onSuccessCallback, onFailureCallback); + } + if ((err = aHandle.SendWriteRequest(GetSecureSession().Value())) != CHIP_NO_ERROR) + { + CancelIMResponseHandler(writeClient); + } + return err; +} + +} // namespace chip diff --git a/src/app/DeviceProxy.h b/src/app/DeviceProxy.h new file mode 100644 index 00000000000000..7303defc1b9960 --- /dev/null +++ b/src/app/DeviceProxy.h @@ -0,0 +1,142 @@ +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * This file contains definitions for DeviceProxy base class. The objects of this + * class will be used by applications to interact with peer CHIP devices. + * The class provides mechanism to construct, send and receive messages to and + * from the corresponding CHIP devices. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace chip { + +class DLL_EXPORT DeviceProxy +{ +public: + virtual ~DeviceProxy() {} + DeviceProxy() {} + + /** + * Called when a connection is closing. + * The object releases all resources associated with the connection. + */ + virtual void OnConnectionExpired(SessionHandle session) = 0; + + /** + * Mark any open session with the device as expired. + */ + virtual CHIP_ERROR Disconnect() = 0; + + virtual NodeId GetDeviceId() const = 0; + + virtual bool GetAddress(Inet::IPAddress & addr, uint16_t & port) const { return false; } + + virtual CHIP_ERROR SendReadAttributeRequest(app::AttributePathParams aPath, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, app::TLVDataFilter aTlvDataFilter); + + virtual CHIP_ERROR SendSubscribeAttributeRequest(app::AttributePathParams aPath, uint16_t mMinIntervalFloorSeconds, + uint16_t mMaxIntervalCeilingSeconds, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + virtual CHIP_ERROR ShutdownSubscriptions() { return CHIP_ERROR_NOT_IMPLEMENTED; } + + virtual CHIP_ERROR SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + + virtual CHIP_ERROR SendCommands(app::CommandSender * commandObj); + + virtual void AddReportHandler(EndpointId endpoint, ClusterId cluster, AttributeId attribute, + Callback::Cancelable * onReportCallback, app::TLVDataFilter tlvDataFilter); + + // Interaction model uses the object and callback interface instead of sequence number to mark different transactions. + virtual void AddIMResponseHandler(void * commandObj, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, app::TLVDataFilter tlvDataFilter = nullptr); + + virtual void CancelIMResponseHandler(void * commandObj); + + virtual Controller::DeviceControllerInteractionModelDelegate * GetInteractionModelDelegate() = 0; + + virtual Messaging::ExchangeManager * GetExchangeManager() const = 0; + + virtual chip::Optional GetSecureSession() const = 0; + + virtual bool IsActive() const { return true; } + + void GetMRPIntervals(uint32_t & idleInterval, uint32_t & activeInterval) const + { + idleInterval = mMrpIdleInterval; + activeInterval = mMrpActiveInterval; + } + +protected: + virtual bool IsSecureConnected() const = 0; + + virtual uint8_t GetNextSequenceNumber() = 0; + + app::CHIPDeviceCallbacksMgr & mCallbacksMgr = app::CHIPDeviceCallbacksMgr::GetInstance(); + + uint32_t mMrpIdleInterval = CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL; + uint32_t mMrpActiveInterval = CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL; +}; + +/** + * This class defines an interface for an object that the user of Device + * can register as a delegate. The delegate object will be called by the + * Device when a new message or status update is received from the corresponding + * CHIP device. + */ +class DLL_EXPORT DeviceStatusDelegate +{ +public: + virtual ~DeviceStatusDelegate() {} + + /** + * @brief + * Called when a message is received from the device. + * + * @param[in] msg Received message buffer. + */ + virtual void OnMessage(System::PacketBufferHandle && msg) = 0; + + /** + * @brief + * Called when response to OpenPairingWindow is received from the device. + * + * @param[in] status CHIP_NO_ERROR on success, or corresponding error. + */ + virtual void OnPairingWindowOpenStatus(CHIP_ERROR status){}; + + /** + * @brief + * Called when device status is updated. + * + */ + virtual void OnStatusChange(void){}; +}; + +} // namespace chip diff --git a/src/app/OperationalDeviceProxy.cpp b/src/app/OperationalDeviceProxy.cpp new file mode 100644 index 00000000000000..95bc97ca3bc720 --- /dev/null +++ b/src/app/OperationalDeviceProxy.cpp @@ -0,0 +1,315 @@ +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * This file contains implementation of Device class. The objects of this + * class will be used by Controller applications to interact with CHIP + * devices. The class provides mechanism to construct, send and receive + * messages to and from the corresponding CHIP devices. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip::Callback; + +namespace chip { + +CHIP_ERROR OperationalDeviceProxy::Connect(Callback::Callback * onConnection, + Callback::Callback * onFailure) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + switch (mState) + { + case State::Uninitialized: + err = CHIP_ERROR_INCORRECT_STATE; + break; + + case State::NeedsAddress: + err = Dnssd::Resolver::Instance().ResolveNodeId(mPeerId, chip::Inet::IPAddressType::kAny); + EnqueueConnectionCallbacks(onConnection, onFailure); + break; + + case State::Initialized: + err = EstablishConnection(); + if (err == CHIP_NO_ERROR) + { + EnqueueConnectionCallbacks(onConnection, onFailure); + } + break; + case State::Connecting: + EnqueueConnectionCallbacks(onConnection, onFailure); + break; + + case State::SecureConnected: + if (onConnection != nullptr) + { + onConnection->mCall(onConnection->mContext, this); + } + break; + + default: + err = CHIP_ERROR_INCORRECT_STATE; + }; + + if (err != CHIP_NO_ERROR && onFailure != nullptr) + { + onFailure->mCall(onFailure->mContext, mPeerId.GetNodeId(), err); + } + + return err; +} + +CHIP_ERROR OperationalDeviceProxy::UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, + uint32_t mrpActiveInterval) +{ + VerifyOrReturnLogError(mState != State::Uninitialized, CHIP_ERROR_INCORRECT_STATE); + + CHIP_ERROR err = CHIP_NO_ERROR; + mDeviceAddress = addr; + + mMrpIdleInterval = mrpIdleInterval; + mMrpActiveInterval = mrpActiveInterval; + + if (mState == State::NeedsAddress) + { + mState = State::Initialized; + err = EstablishConnection(); + if (err != CHIP_NO_ERROR) + { + OnSessionEstablishmentError(err); + } + } + else + { + if (!mSecureSession.HasValue()) + { + // Nothing needs to be done here. It's not an error to not have a + // secureSession. For one thing, we could have gotten an different + // UpdateAddress already and that caused connections to be torn down and + // whatnot. + return CHIP_NO_ERROR; + } + + Transport::SecureSession * secureSession = mInitParams.sessionManager->GetSecureSession(mSecureSession.Value()); + if (secureSession != nullptr) + { + secureSession->SetPeerAddress(addr); + secureSession->SetMRPIntervals(mrpIdleInterval, mrpActiveInterval); + } + } + + return err; +} + +bool OperationalDeviceProxy::GetAddress(Inet::IPAddress & addr, uint16_t & port) const +{ + if (mState == State::Uninitialized || mState == State::NeedsAddress) + { + return false; + } + + addr = mDeviceAddress.GetIPAddress(); + port = mDeviceAddress.GetPort(); + return true; +} + +CHIP_ERROR OperationalDeviceProxy::EstablishConnection() +{ + // Create a UnauthenticatedSession for CASE pairing. + // Don't use mSecureSession here, because mSecureSession is for encrypted communication. + Optional session = mInitParams.sessionManager->CreateUnauthenticatedSession(mDeviceAddress); + VerifyOrReturnError(session.HasValue(), CHIP_ERROR_NO_MEMORY); + + session.Value().GetUnauthenticatedSession()->SetMRPIntervals(mMrpIdleInterval, mMrpActiveInterval); + + Messaging::ExchangeContext * exchange = mInitParams.exchangeMgr->NewContext(session.Value(), &mCASESession); + VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL); + + ReturnErrorOnFailure(mCASESession.MessageDispatch().Init(mInitParams.sessionManager)); + + uint16_t keyID = 0; + ReturnErrorOnFailure(mInitParams.idAllocator->Allocate(keyID)); + + ReturnErrorOnFailure( + mCASESession.EstablishSession(mDeviceAddress, mInitParams.fabricInfo, mPeerId.GetNodeId(), keyID, exchange, this)); + + mState = State::Connecting; + + return CHIP_NO_ERROR; +} + +void OperationalDeviceProxy::EnqueueConnectionCallbacks(Callback::Callback * onConnection, + Callback::Callback * onFailure) +{ + if (onConnection != nullptr) + { + mConnectionSuccess.Enqueue(onConnection->Cancel()); + } + + if (onFailure != nullptr) + { + mConnectionFailure.Enqueue(onFailure->Cancel()); + } +} + +void OperationalDeviceProxy::DequeueConnectionSuccessCallbacks(bool executeCallback) +{ + Cancelable ready; + mConnectionSuccess.DequeueAll(ready); + while (ready.mNext != &ready) + { + Callback::Callback * cb = Callback::Callback::FromCancelable(ready.mNext); + + cb->Cancel(); + if (executeCallback) + { + cb->mCall(cb->mContext, this); + } + } +} + +void OperationalDeviceProxy::DequeueConnectionFailureCallbacks(CHIP_ERROR error, bool executeCallback) +{ + Cancelable ready; + mConnectionFailure.DequeueAll(ready); + while (ready.mNext != &ready) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(ready.mNext); + + cb->Cancel(); + if (executeCallback) + { + cb->mCall(cb->mContext, mPeerId.GetNodeId(), error); + } + } +} + +void OperationalDeviceProxy::OnSessionEstablishmentError(CHIP_ERROR error) +{ + VerifyOrReturn(mState != State::Uninitialized && mState != State::NeedsAddress, + ChipLogError(Controller, "OnSessionEstablishmentError was called while the device was not initialized")); + + mState = State::Initialized; + mInitParams.idAllocator->Free(mCASESession.GetLocalSessionId()); + + DequeueConnectionSuccessCallbacks(/* executeCallback */ false); + DequeueConnectionFailureCallbacks(error, /* executeCallback */ true); +} + +void OperationalDeviceProxy::OnSessionEstablished() +{ + VerifyOrReturn(mState != State::Uninitialized, + ChipLogError(Controller, "OnSessionEstablished was called while the device was not initialized")); + + CHIP_ERROR err = mInitParams.sessionManager->NewPairing( + Optional::Value(mDeviceAddress), mPeerId.GetNodeId(), &mCASESession, + CryptoContext::SessionRole::kInitiator, mInitParams.fabricInfo->GetFabricIndex()); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Failed in setting up CASE secure channel: err %s", ErrorStr(err)); + OnSessionEstablishmentError(err); + return; + } + mSecureSession.SetValue(SessionHandle(mPeerId.GetNodeId(), mCASESession.GetLocalSessionId(), mCASESession.GetPeerSessionId(), + mInitParams.fabricInfo->GetFabricIndex())); + + mState = State::SecureConnected; + + DequeueConnectionFailureCallbacks(CHIP_NO_ERROR, /* executeCallback */ false); + DequeueConnectionSuccessCallbacks(/* executeCallback */ true); +} + +CHIP_ERROR OperationalDeviceProxy::Disconnect() +{ + ReturnErrorCodeIf(mState != State::SecureConnected, CHIP_ERROR_INCORRECT_STATE); + if (mSecureSession.HasValue()) + { + mInitParams.sessionManager->ExpirePairing(mSecureSession.Value()); + } + mState = State::Initialized; + mCASESession.Clear(); + return CHIP_NO_ERROR; +} + +void OperationalDeviceProxy::Clear() +{ + mCASESession.Clear(); + + mState = State::Uninitialized; + mStatusDelegate = nullptr; + if (mInitParams.exchangeMgr) + { + // Ensure that any exchange contexts we have open get closed now, + // because we don't want them to call back in to us after this + // point. + mInitParams.exchangeMgr->CloseAllContextsForDelegate(this); + } + mInitParams = DeviceProxyInitParams(); +} + +void OperationalDeviceProxy::OnConnectionExpired(SessionHandle session) +{ + VerifyOrReturn(mSecureSession.HasValue() && mSecureSession.Value() == session, + ChipLogDetail(Controller, "Connection expired, but it doesn't match the current session")); + mState = State::Initialized; + mSecureSession.ClearValue(); +} + +CHIP_ERROR OperationalDeviceProxy::OnMessageReceived(Messaging::ExchangeContext * exchange, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && msgBuf) +{ + if (mState == State::SecureConnected) + { + if (mStatusDelegate != nullptr) + { + mStatusDelegate->OnMessage(std::move(msgBuf)); + } + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR OperationalDeviceProxy::ShutdownSubscriptions() +{ + return app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(mInitParams.fabricInfo->GetFabricIndex(), + GetDeviceId()); +} + +OperationalDeviceProxy::~OperationalDeviceProxy() +{ + if (mInitParams.exchangeMgr) + { + // Ensure that any exchange contexts we have open get closed now, + // because we don't want them to call back in to us after this + // point. + mInitParams.exchangeMgr->CloseAllContextsForDelegate(this); + } +} + +} // namespace chip diff --git a/src/app/OperationalDeviceProxy.h b/src/app/OperationalDeviceProxy.h new file mode 100644 index 00000000000000..e860972071aad0 --- /dev/null +++ b/src/app/OperationalDeviceProxy.h @@ -0,0 +1,218 @@ +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * This file contains definitions for Device class. The objects of this + * class will be used by Controller applications to interact with CHIP + * devices. The class provides mechanism to construct, send and receive + * messages to and from the corresponding CHIP devices. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip { + +class DeviceStatusDelegate; + +struct DeviceProxyInitParams +{ + SessionManager * sessionManager = nullptr; + Messaging::ExchangeManager * exchangeMgr = nullptr; + SessionIDAllocator * idAllocator = nullptr; + FabricInfo * fabricInfo = nullptr; + + Controller::DeviceControllerInteractionModelDelegate * imDelegate = nullptr; +}; + +class OperationalDeviceProxy; + +typedef void (*OnDeviceConnected)(void * context, DeviceProxy * device); +typedef void (*OnDeviceConnectionFailure)(void * context, NodeId deviceId, CHIP_ERROR error); + +class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, Messaging::ExchangeDelegate, public SessionEstablishmentDelegate +{ +public: + virtual ~OperationalDeviceProxy(); + OperationalDeviceProxy(DeviceProxyInitParams params, PeerId peerId) + { + VerifyOrReturn(params.sessionManager != nullptr); + VerifyOrReturn(params.exchangeMgr != nullptr); + VerifyOrReturn(params.idAllocator != nullptr); + VerifyOrReturn(params.fabricInfo != nullptr); + + mInitParams = params; + mPeerId = peerId; + mState = State::NeedsAddress; + } + + void Clear(); + + /* + * This function can be called to establish a secure session with the device. + * + * The device is expected to have been commissioned, A CASE session + * setup will be triggered. + * + * On establishing the session, the callback function `onConnection` will be called. If the + * session setup fails, `onFailure` will be called. + * + * If the session already exists, `onConnection` will be called immediately. + */ + CHIP_ERROR Connect(Callback::Callback * onConnection, + Callback::Callback * onFailure); + + bool IsConnected() const { return mState == State::SecureConnected; } + + bool IsConnecting() const { return mState == State::Connecting; } + + /** + * Called when a connection is closing. + * The object releases all resources associated with the connection. + */ + void OnConnectionExpired(SessionHandle session) override; + + /** + * Mark any open session with the device as expired. + */ + CHIP_ERROR Disconnect() override; + + NodeId GetDeviceId() const override { return mPeerId.GetNodeId(); } + /* + // ----- Messaging ----- + CHIP_ERROR SendReadAttributeRequest(app::AttributePathParams aPath, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, app::TLVDataFilter aTlvDataFilter) override; + + CHIP_ERROR SendSubscribeAttributeRequest(app::AttributePathParams aPath, uint16_t mMinIntervalFloorSeconds, + uint16_t mMaxIntervalCeilingSeconds, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) override; + + CHIP_ERROR SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) override; + + CHIP_ERROR SendCommands(app::CommandSender * commandObj) override; + + void AddReportHandler(EndpointId endpoint, ClusterId cluster, AttributeId attribute, Callback::Cancelable * + onReportCallback, app::TLVDataFilter tlvDataFilter) override; + + void AddIMResponseHandler(void * commandObj, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * + onFailureCallback, app::TLVDataFilter tlvDataFilter = nullptr) override; void CancelIMResponseHandler(void * commandObj) + override; + */ + /** + * @brief + * This function is called when a message is received from the corresponding + * device. The message ownership is transferred to the function, and it is expected + * to release the message buffer before returning. + */ + CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * exchange, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && msgBuf) override; + + void OnResponseTimeout(Messaging::ExchangeContext * ec) override {} + + /** + * Update data of the device. + * This function will set new IP address, port and MRP retransmission intervals of the device. + * Since the device settings might have been moved from RAM to the persistent storage, the function + * will load the device settings first, before making the changes. + */ + CHIP_ERROR UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, uint32_t mrpActiveInterval); + + /** + * Set the delegate object which will be called when a message is received. + * The user of this Device object must reset the delegate (by calling + * SetDelegate(nullptr)) before releasing their delegate object. + */ + void SetDelegate(DeviceStatusDelegate * delegate) { mStatusDelegate = delegate; } + + PeerId GetPeerId() const { return mPeerId; } + + bool MatchesSession(SessionHandle session) const { return mSecureSession.HasValue() && mSecureSession.Value() == session; } + + uint8_t GetNextSequenceNumber() override { return mSequenceNumber++; }; + + CHIP_ERROR ShutdownSubscriptions() override; + + //////////// SessionEstablishmentDelegate Implementation /////////////// + void OnSessionEstablishmentError(CHIP_ERROR error) override; + void OnSessionEstablished() override; + + CASESession & GetCASESession() { return mCASESession; } + + Controller::DeviceControllerInteractionModelDelegate * GetInteractionModelDelegate() override { return mInitParams.imDelegate; } + + Messaging::ExchangeManager * GetExchangeManager() const override { return mInitParams.exchangeMgr; } + + chip::Optional GetSecureSession() const override { return mSecureSession; } + + bool GetAddress(Inet::IPAddress & addr, uint16_t & port) const override; + +private: + enum class State + { + Uninitialized, + NeedsAddress, + Initialized, + Connecting, + SecureConnected, + }; + + DeviceProxyInitParams mInitParams; + + CASESession mCASESession; + + PeerId mPeerId; + + Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); + + State mState = State::Uninitialized; + + DeviceStatusDelegate * mStatusDelegate = nullptr; + Optional mSecureSession = Optional::Missing(); + + uint8_t mSequenceNumber = 0; + + Callback::CallbackDeque mConnectionSuccess; + Callback::CallbackDeque mConnectionFailure; + + CHIP_ERROR EstablishConnection(); + + bool IsSecureConnected() const override { return mState == State::SecureConnected; } + + void EnqueueConnectionCallbacks(Callback::Callback * onConnection, + Callback::Callback * onFailure); + + void DequeueConnectionSuccessCallbacks(bool executeCallback); + void DequeueConnectionFailureCallbacks(CHIP_ERROR error, bool executeCallback); +}; + +} // namespace chip diff --git a/src/app/server/Server.h b/src/app/server/Server.h index b61500015b9286..112f5d769ac9eb 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include @@ -71,6 +72,13 @@ class Server : public Messaging::ExchangeDelegate TransportMgrBase & GetTransportManager() { return mTransports; } + chip::OperationalDeviceProxy * GetOperationalDeviceProxy() { return mOperationalDeviceProxy; } + + void SetOperationalDeviceProxy(chip::OperationalDeviceProxy * operationalDeviceProxy) + { + mOperationalDeviceProxy = operationalDeviceProxy; + } + #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * getBleLayerObject() { return mBleLayer; } #endif @@ -148,6 +156,8 @@ class Server : public Messaging::ExchangeDelegate ServerStorageDelegate mServerStorage; CommissioningWindowManager mCommissioningWindowManager; + chip::OperationalDeviceProxy * mOperationalDeviceProxy = nullptr; + // TODO @ceille: Maybe use OperationalServicePort and CommissionableServicePort uint16_t mSecuredServicePort; uint16_t mUnsecuredServicePort; diff --git a/src/app/tests/TestOperationalDeviceProxy.cpp b/src/app/tests/TestOperationalDeviceProxy.cpp new file mode 100644 index 00000000000000..fb1d0936bed521 --- /dev/null +++ b/src/app/tests/TestOperationalDeviceProxy.cpp @@ -0,0 +1,108 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::Transport; +using namespace chip::Messaging; + +#if INET_CONFIG_ENABLE_IPV4 +namespace { + +using TestTransportMgr = TransportMgr; + +void TestOperationalDeviceProxy_EstablishSessionDirectly(nlTestSuite * inSuite, void * inContext) +{ + Platform::MemoryInit(); + TestTransportMgr transportMgr; + SessionManager sessionManager; + ExchangeManager exchangeMgr; + Inet::InetLayer inetLayer; + System::LayerImpl systemLayer; + // Heap-allocate the fairly large FabricTable so we don't end up with a huge + // stack. + FabricTable * fabrics = Platform::New(); + FabricInfo * fabric = fabrics->FindFabricWithIndex(1); + secure_channel::MessageCounterManager messageCounterManager; + SessionIDAllocator idAllocator; + + systemLayer.Init(); + inetLayer.Init(systemLayer, nullptr); + transportMgr.Init(UdpListenParameters(&inetLayer).SetAddressType(Inet::IPAddressType::kIPv4).SetListenPort(CHIP_PORT)); + sessionManager.Init(&systemLayer, &transportMgr, &messageCounterManager); + exchangeMgr.Init(&sessionManager); + messageCounterManager.Init(&exchangeMgr); + + DeviceProxyInitParams params = { + .sessionManager = &sessionManager, + .exchangeMgr = &exchangeMgr, + .idAllocator = &idAllocator, + .fabricInfo = fabric, + }; + NodeId mockNodeId = 1; + OperationalDeviceProxy device(params, PeerId().SetNodeId(mockNodeId)); + Inet::IPAddress mockAddr; + Inet::IPAddress::FromString("127.0.0.1", mockAddr); + PeerAddress addr = PeerAddress::UDP(mockAddr, CHIP_PORT); + device.UpdateAddress(addr); + + NL_TEST_ASSERT(inSuite, device.Connect(nullptr, nullptr) == CHIP_NO_ERROR); + + device.Clear(); + messageCounterManager.Shutdown(); + exchangeMgr.Shutdown(); + sessionManager.Shutdown(); + Platform::Delete(fabrics); + transportMgr.Close(); + inetLayer.Shutdown(); + systemLayer.Shutdown(); + Platform::MemoryShutdown(); +} + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestOperationalDeviceProxy_EstablishSessionDirectly", TestOperationalDeviceProxy_EstablishSessionDirectly), + NL_TEST_SENTINEL() +}; +// clang-format on + +} // namespace + +int TestOperationalDeviceProxy() +{ + nlTestSuite theSuite = { "OperationalDeviceProxy", &sTests[0], NULL, NULL }; + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestOperationalDeviceProxy) + +#endif // INET_CONFIG_ENABLE_IPV4 diff --git a/src/app/util/CHIPDeviceCallbacksMgr.cpp b/src/app/util/CHIPDeviceCallbacksMgr.cpp index 5dbc9efdb254cc..e8b905e00cd271 100644 --- a/src/app/util/CHIPDeviceCallbacksMgr.cpp +++ b/src/app/util/CHIPDeviceCallbacksMgr.cpp @@ -32,6 +32,12 @@ namespace chip { namespace app { +CHIPDeviceCallbacksMgr & CHIPDeviceCallbacksMgr::GetInstance() +{ + static CHIPDeviceCallbacksMgr instance; + return instance; +} + CHIP_ERROR CHIPDeviceCallbacksMgr::AddResponseCallback(NodeId nodeId, uint8_t sequenceNumber, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, TLVDataFilter filter) diff --git a/src/app/util/CHIPDeviceCallbacksMgr.h b/src/app/util/CHIPDeviceCallbacksMgr.h index cba369a4103d32..9d8741cf15bebe 100644 --- a/src/app/util/CHIPDeviceCallbacksMgr.h +++ b/src/app/util/CHIPDeviceCallbacksMgr.h @@ -63,11 +63,7 @@ class DLL_EXPORT CHIPDeviceCallbacksMgr CHIPDeviceCallbacksMgr(const CHIPDeviceCallbacksMgr &&) = delete; CHIPDeviceCallbacksMgr & operator=(const CHIPDeviceCallbacksMgr &) = delete; - static CHIPDeviceCallbacksMgr & GetInstance() - { - static CHIPDeviceCallbacksMgr instance; - return instance; - } + static CHIPDeviceCallbacksMgr & GetInstance(); CHIP_ERROR AddResponseCallback(NodeId nodeId, uint8_t sequenceNumber, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, TLVDataFilter callbackFilter = nullptr); diff --git a/src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt b/src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt index 73a706135f0071..dababb33e1b4a5 100644 --- a/src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt @@ -28,7 +28,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseSuccessCallback successCb, CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); diff --git a/src/app/zap-templates/templates/app/CHIPClustersWrite-src.zapt b/src/app/zap-templates/templates/app/CHIPClustersWrite-src.zapt index efd19d6928f312..ea2d742a3ddb2e 100644 --- a/src/app/zap-templates/templates/app/CHIPClustersWrite-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClustersWrite-src.zapt @@ -31,7 +31,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/src/app/zap-templates/templates/app/tests/CHIPClustersWrite-src.zapt b/src/app/zap-templates/templates/app/tests/CHIPClustersWrite-src.zapt index 5068082e472513..1f3b50ae8af49b 100644 --- a/src/app/zap-templates/templates/app/tests/CHIPClustersWrite-src.zapt +++ b/src/app/zap-templates/templates/app/tests/CHIPClustersWrite-src.zapt @@ -24,7 +24,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/src/controller/BUILD.gn b/src/controller/BUILD.gn index 9616fb766507bd..33874bd47a60b6 100644 --- a/src/controller/BUILD.gn +++ b/src/controller/BUILD.gn @@ -30,12 +30,12 @@ static_library("controller") { "CHIPCluster.h", "CHIPCommissionableNodeController.cpp", "CHIPCommissionableNodeController.h", - "CHIPDevice.cpp", - "CHIPDevice.h", "CHIPDeviceController.cpp", "CHIPDeviceController.h", "CHIPDeviceControllerFactory.cpp", "CHIPDeviceControllerFactory.h", + "CommissioneeDeviceProxy.cpp", + "CommissioneeDeviceProxy.h", "DeviceAddressUpdateDelegate.h", "DeviceDiscoveryDelegate.h", "EmptyDataModelHandler.cpp", diff --git a/src/controller/CHIPCluster.cpp b/src/controller/CHIPCluster.cpp index 5ced92e3c468e2..b6d2e03112c52f 100644 --- a/src/controller/CHIPCluster.cpp +++ b/src/controller/CHIPCluster.cpp @@ -31,7 +31,7 @@ namespace chip { namespace Controller { -CHIP_ERROR ClusterBase::Associate(Device * device, EndpointId endpoint) +CHIP_ERROR ClusterBase::Associate(DeviceProxy * device, EndpointId endpoint) { CHIP_ERROR err = CHIP_NO_ERROR; // TODO: Check if the device supports mCluster at the requested endpoint diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index 7fc7ff3f3ccd93..389d46cb8f3cbd 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -27,8 +27,8 @@ #pragma once #include "app/ConcreteCommandPath.h" +#include #include -#include #include #include @@ -46,7 +46,7 @@ class DLL_EXPORT ClusterBase public: virtual ~ClusterBase() {} - CHIP_ERROR Associate(Device * device, EndpointId endpoint); + CHIP_ERROR Associate(DeviceProxy * device, EndpointId endpoint); void Dissociate(); @@ -85,7 +85,7 @@ class DLL_EXPORT ClusterBase app::TLVDataFilter tlvDataFilter); const ClusterId mClusterId; - Device * mDevice; + DeviceProxy * mDevice; EndpointId mEndpoint; }; diff --git a/src/controller/CHIPDevice.cpp b/src/controller/CHIPDevice.cpp deleted file mode 100644 index 43445614c9f693..00000000000000 --- a/src/controller/CHIPDevice.cpp +++ /dev/null @@ -1,887 +0,0 @@ -/* - * - * Copyright (c) 2020-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. - */ - -/** - * @file - * This file contains implementation of Device class. The objects of this - * class will be used by Controller applications to interact with CHIP - * devices. The class provides mechanism to construct, send and receive - * messages to and from the corresponding CHIP devices. - */ - -#include - -#include - -#if CONFIG_DEVICE_LAYER -#include -#endif - -#if CHIP_SYSTEM_CONFIG_USE_LWIP -#include -#include -#endif // CHIP_SYSTEM_CONFIG_USE_LWIP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace chip::Inet; -using namespace chip::System; -using namespace chip::Callback; - -namespace chip { -namespace Controller { -CHIP_ERROR Device::LoadSecureSessionParametersIfNeeded(bool & didLoad) -{ - didLoad = false; - - // If there is no secure connection to the device, try establishing it - if (mState != ConnectionState::SecureConnected) - { - ReturnErrorOnFailure(LoadSecureSessionParameters()); - didLoad = true; - } - else - { - if (mSecureSession.HasValue()) - { - Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value()); - // Check if the connection state has the correct transport information - if (secureSession->GetPeerAddress().GetTransportType() == Transport::Type::kUndefined) - { - mState = ConnectionState::NotConnected; - ReturnErrorOnFailure(LoadSecureSessionParameters()); - didLoad = true; - } - } - else - { - mState = ConnectionState::NotConnected; - ReturnErrorOnFailure(LoadSecureSessionParameters()); - didLoad = true; - } - } - - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::SendCommands(app::CommandSender * commandObj) -{ - bool loadedSecureSession = false; - ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(loadedSecureSession)); - VerifyOrReturnError(mState == ConnectionState::SecureConnected, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(GetSecureSession().HasValue(), CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(commandObj != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - return commandObj->SendCommandRequest(mSecureSession.Value()); -} - -CHIP_ERROR Device::Serialize(SerializedDevice & output) -{ - SerializableDevice serializable; - - static_assert(BASE64_ENCODED_LEN(sizeof(serializable)) <= sizeof(output.inner), - "Size of serializable should be <= size of output"); - - CHIP_ZERO_AT(serializable); - CHIP_ZERO_AT(output); - - serializable.mOpsCreds = mPairing; - serializable.mDeviceId = Encoding::LittleEndian::HostSwap64(mDeviceId); - serializable.mDevicePort = Encoding::LittleEndian::HostSwap16(mDeviceAddress.GetPort()); - serializable.mFabricIndex = Encoding::LittleEndian::HostSwap16(mFabricIndex); - - // The connection state could be null if the device is moving from PASE connection to CASE connection. - // The device parameters (e.g. mDeviceOperationalCertProvisioned) are updated during this transition. - // The state during this transistion is being persisted so that the next access of the device will - // trigger the CASE based secure session. - if (mSecureSession.HasValue()) - { - Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value()); - const uint32_t localMessageCounter = secureSession->GetSessionMessageCounter().GetLocalMessageCounter().Value(); - const uint32_t peerMessageCounter = secureSession->GetSessionMessageCounter().GetPeerMessageCounter().GetCounter(); - - serializable.mLocalMessageCounter = Encoding::LittleEndian::HostSwap32(localMessageCounter); - serializable.mPeerMessageCounter = Encoding::LittleEndian::HostSwap32(peerMessageCounter); - } - else - { - serializable.mLocalMessageCounter = 0; - serializable.mPeerMessageCounter = 0; - } - - serializable.mDeviceOperationalCertProvisioned = (mDeviceOperationalCertProvisioned) ? 1 : 0; - - serializable.mDeviceTransport = to_underlying(mDeviceAddress.GetTransportType()); - - ReturnErrorOnFailure(mDeviceAddress.GetInterface().GetInterfaceName(Uint8::to_char(serializable.mInterfaceName), - sizeof(serializable.mInterfaceName))); - static_assert(sizeof(serializable.mDeviceAddr) <= INET6_ADDRSTRLEN, "Size of device address must fit within INET6_ADDRSTRLEN"); - mDeviceAddress.GetIPAddress().ToString(Uint8::to_char(serializable.mDeviceAddr), sizeof(serializable.mDeviceAddr)); - - const uint16_t serializedLen = chip::Base64Encode(Uint8::to_const_uchar(reinterpret_cast(&serializable)), - static_cast(sizeof(serializable)), Uint8::to_char(output.inner)); - VerifyOrReturnError(serializedLen > 0, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(serializedLen < sizeof(output.inner), CHIP_ERROR_INVALID_ARGUMENT); - output.inner[serializedLen] = '\0'; - - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::Deserialize(const SerializedDevice & input) -{ - SerializableDevice serializable; - constexpr size_t maxlen = BASE64_ENCODED_LEN(sizeof(serializable)); - const size_t len = strnlen(Uint8::to_const_char(&input.inner[0]), maxlen); - - VerifyOrReturnError(len < sizeof(SerializedDevice), CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_INVALID_ARGUMENT); - - CHIP_ZERO_AT(serializable); - const uint16_t deserializedLen = Base64Decode(Uint8::to_const_char(input.inner), static_cast(len), - Uint8::to_uchar(reinterpret_cast(&serializable))); - - VerifyOrReturnError(deserializedLen > 0, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(deserializedLen <= sizeof(serializable), CHIP_ERROR_INVALID_ARGUMENT); - - // The second parameter to FromString takes the strlen value. We are subtracting 1 - // from the sizeof(serializable.mDeviceAddr) to account for null termination, since - // strlen doesn't include null character in the size. - Inet::IPAddress ipAddress = {}; - VerifyOrReturnError( - IPAddress::FromString(Uint8::to_const_char(serializable.mDeviceAddr), sizeof(serializable.mDeviceAddr) - 1, ipAddress), - CHIP_ERROR_INVALID_ADDRESS); - - mPairing = serializable.mOpsCreds; - mDeviceId = Encoding::LittleEndian::HostSwap64(serializable.mDeviceId); - const uint16_t port = Encoding::LittleEndian::HostSwap16(serializable.mDevicePort); - const uint16_t index = Encoding::LittleEndian::HostSwap16(serializable.mFabricIndex); - mLocalMessageCounter = Encoding::LittleEndian::HostSwap32(serializable.mLocalMessageCounter); - mPeerMessageCounter = Encoding::LittleEndian::HostSwap32(serializable.mPeerMessageCounter); - - VerifyOrReturnError(CanCastTo(index), CHIP_ERROR_INVALID_ARGUMENT); - mFabricIndex = static_cast(index); - - // TODO - Remove the hack that's incrementing message counter while deserializing device - // This hack was added as a quick workaround for TE3 testing. The commissioning code - // is closing the exchange after the device has already been serialized and persisted to the storage. - // While closing the exchange, the outstanding ack gets sent to the device, thus incrementing - // the local message counter. As the device information was stored prior to sending the ack, it now has - // the old counter value (which is 1 less than the updated counter). - mLocalMessageCounter++; - - mDeviceOperationalCertProvisioned = (serializable.mDeviceOperationalCertProvisioned != 0); - - // The InterfaceNameToId() API requires initialization of mInterface, and lock/unlock of - // LwIP stack. - Inet::InterfaceId interfaceId; - if (serializable.mInterfaceName[0] != '\0') - { -#if CHIP_SYSTEM_CONFIG_USE_LWIP - LOCK_TCPIP_CORE(); -#endif - CHIP_ERROR inetErr = Inet::InterfaceId::InterfaceNameToId(Uint8::to_const_char(serializable.mInterfaceName), interfaceId); -#if CHIP_SYSTEM_CONFIG_USE_LWIP - UNLOCK_TCPIP_CORE(); -#endif - ReturnErrorOnFailure(inetErr); - } - - static_assert(std::is_same::type, uint8_t>::value, - "The underlying type of Transport::Type is not uint8_t."); - switch (static_cast(serializable.mDeviceTransport)) - { - case Transport::Type::kUdp: - mDeviceAddress = Transport::PeerAddress::UDP(ipAddress, port, interfaceId); - break; - case Transport::Type::kBle: - mDeviceAddress = Transport::PeerAddress::BLE(); - break; - case Transport::Type::kTcp: - case Transport::Type::kUndefined: - default: - return CHIP_ERROR_INTERNAL; - } - - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::Persist() -{ - CHIP_ERROR error = CHIP_NO_ERROR; - if (mStorageDelegate != nullptr) - { - SerializedDevice serialized; - ReturnErrorOnFailure(Serialize(serialized)); - - // TODO: no need to base-64 the serialized values AGAIN - PERSISTENT_KEY_OP(GetDeviceId(), kPairedDeviceKeyPrefix, key, - error = mStorageDelegate->SyncSetKeyValue(key, serialized.inner, sizeof(serialized.inner))); - if (error != CHIP_NO_ERROR) - { - ChipLogError(Controller, "Failed to persist device %" CHIP_ERROR_FORMAT, error.Format()); - } - } - return error; -} - -void Device::OnNewConnection(SessionHandle session) -{ - // Only allow update if the session has been initialized and matches - if (mSecureSession.HasValue() && !MatchesSession(session)) - { - return; - } - - mState = ConnectionState::SecureConnected; - mSecureSession.SetValue(session); - - // Reset the message counters here because this is the first time we get a handle to the secure session. - // Since CHIPDevices can be serialized/deserialized in the middle of what is conceptually a single PASE session - // we need to restore the session counters along with the session information. - Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value()); - VerifyOrReturn(secureSession != nullptr); - - secureSession->SetMRPIntervals(mMrpIdleInterval, mMrpActiveInterval); - - MessageCounter & localCounter = secureSession->GetSessionMessageCounter().GetLocalMessageCounter(); - if (localCounter.SetCounter(mLocalMessageCounter) != CHIP_NO_ERROR) - { - ChipLogError(Controller, "Unable to restore local counter to %" PRIu32, mLocalMessageCounter); - } - Transport::PeerMessageCounter & peerCounter = secureSession->GetSessionMessageCounter().GetPeerMessageCounter(); - peerCounter.SetCounter(mPeerMessageCounter); -} - -void Device::OnConnectionExpired(SessionHandle session) -{ - VerifyOrReturn(mSecureSession.HasValue() && mSecureSession.Value() == session, - ChipLogDetail(Controller, "Connection expired, but it doesn't match the current session")); - mState = ConnectionState::NotConnected; - mSecureSession.ClearValue(); -} - -CHIP_ERROR Device::OnMessageReceived(Messaging::ExchangeContext * exchange, const PayloadHeader & payloadHeader, - System::PacketBufferHandle && msgBuf) -{ - if (mState == ConnectionState::SecureConnected) - { - if (mStatusDelegate != nullptr) - { - mStatusDelegate->OnMessage(std::move(msgBuf)); - } - else - { - HandleDataModelMessage(exchange, std::move(msgBuf)); - } - } - return CHIP_NO_ERROR; -} - -void Device::OnResponseTimeout(Messaging::ExchangeContext * ec) {} - -void Device::OnOpenPairingWindowSuccessResponse(void * context) -{ - ChipLogProgress(Controller, "Successfully opened pairing window on the device"); - Device * device = reinterpret_cast(context); - if (device->mCommissioningWindowCallback != nullptr) - { - device->mCommissioningWindowCallback->mCall(device->mCommissioningWindowCallback->mContext, device->GetDeviceId(), - CHIP_NO_ERROR, device->mSetupPayload); - } -} - -void Device::OnOpenPairingWindowFailureResponse(void * context, uint8_t status) -{ - ChipLogError(Controller, "Failed to open pairing window on the device. Status %d", status); - Device * device = reinterpret_cast(context); - if (device->mCommissioningWindowCallback != nullptr) - { - CHIP_ERROR error = CHIP_ERROR_INVALID_PASE_PARAMETER; - // TODO - Use cluster enum chip::app::Clusters::AdministratorCommissioning::StatusCode::kBusy - if (status == 1) - { - error = CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS; - } - device->mCommissioningWindowCallback->mCall(device->mCommissioningWindowCallback->mContext, device->GetDeviceId(), error, - SetupPayload()); - } -} - -CHIP_ERROR Device::ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt, - PASEVerifier & outVerifier, uint32_t & outPasscodeId) -{ - ReturnErrorOnFailure(PASESession::GeneratePASEVerifier(outVerifier, iterations, salt, /* useRandomPIN= */ false, setupPincode)); - - outPasscodeId = mPAKEVerifierID++; - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::OpenCommissioningWindow(uint16_t timeout, uint32_t iteration, CommissioningWindowOption option, - const ByteSpan & salt, Callback::Callback * callback, - SetupPayload & setupPayload) -{ - constexpr EndpointId kAdministratorCommissioningClusterEndpoint = 0; - - chip::Controller::AdministratorCommissioningCluster cluster; - cluster.Associate(this, kAdministratorCommissioningClusterEndpoint); - - Callback::Cancelable * successCallback = mOpenPairingSuccessCallback.Cancel(); - Callback::Cancelable * failureCallback = mOpenPairingFailureCallback.Cancel(); - - mCommissioningWindowCallback = callback; - if (option != CommissioningWindowOption::kOriginalSetupCode) - { - bool randomSetupPIN = (option == CommissioningWindowOption::kTokenWithRandomPIN); - PASEVerifier verifier; - - ReturnErrorOnFailure( - PASESession::GeneratePASEVerifier(verifier, iteration, salt, randomSetupPIN, setupPayload.setUpPINCode)); - - uint8_t serializedVerifier[2 * kSpake2p_WS_Length]; - VerifyOrReturnError(sizeof(serializedVerifier) == sizeof(verifier), CHIP_ERROR_INTERNAL); - - memcpy(serializedVerifier, verifier.mW0, kSpake2p_WS_Length); - memcpy(&serializedVerifier[kSpake2p_WS_Length], verifier.mL, kSpake2p_WS_Length); - - ReturnErrorOnFailure(cluster.OpenCommissioningWindow(successCallback, failureCallback, timeout, - ByteSpan(serializedVerifier, sizeof(serializedVerifier)), - setupPayload.discriminator, iteration, salt, mPAKEVerifierID++)); - } - else - { - ReturnErrorOnFailure(cluster.OpenBasicCommissioningWindow(successCallback, failureCallback, timeout)); - } - - setupPayload.version = 0; - setupPayload.rendezvousInformation = RendezvousInformationFlags(RendezvousInformationFlag::kOnNetwork); - - mSetupPayload = setupPayload; - - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::OpenPairingWindow(uint16_t timeout, CommissioningWindowOption option, SetupPayload & setupPayload) -{ - ByteSpan salt(reinterpret_cast(kSpake2pKeyExchangeSalt), strlen(kSpake2pKeyExchangeSalt)); - - return OpenCommissioningWindow(timeout, kPBKDFMinimumIterations, option, salt, nullptr, setupPayload); -} - -void Device::UpdateSession(bool connected) -{ - SessionHandle session = - SessionHandle(mDeviceId, mCASESession.GetLocalSessionId(), mCASESession.GetPeerSessionId(), mFabricIndex); - if (connected) - { - OnNewConnection(session); - } - else - { - OnConnectionExpired(session); - } -} - -CHIP_ERROR Device::CloseSession() -{ - ReturnErrorCodeIf(mState != ConnectionState::SecureConnected, CHIP_ERROR_INCORRECT_STATE); - if (mSecureSession.HasValue()) - { - mSessionManager->ExpirePairing(mSecureSession.Value()); - } - mState = ConnectionState::NotConnected; - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, uint32_t mrpActiveInterval) -{ - bool didLoad; - - mDeviceAddress = addr; - mMrpIdleInterval = mrpIdleInterval; - mMrpActiveInterval = mrpActiveInterval; - - ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(didLoad)); - - if (!mSecureSession.HasValue()) - { - // Nothing needs to be done here. It's not an error to not have a - // secureSession. For one thing, we could have gotten an different - // UpdateAddress already and that caused connections to be torn down and - // whatnot. - return CHIP_NO_ERROR; - } - - Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value()); - secureSession->SetPeerAddress(addr); - secureSession->SetMRPIntervals(mrpIdleInterval, mrpActiveInterval); - - return CHIP_NO_ERROR; -} - -void Device::Reset() -{ - if (IsActive() && mStorageDelegate != nullptr && mSessionManager != nullptr) - { - // If a session can be found, persist the device so that we track the newest message counter values - - if (mSecureSession.HasValue()) - { - Persist(); - } - } - - SetActive(false); - mCASESession.Clear(); - - mState = ConnectionState::NotConnected; - mSessionManager = nullptr; - mStatusDelegate = nullptr; - mInetLayer = nullptr; -#if CONFIG_NETWORK_LAYER_BLE - mBleLayer = nullptr; -#endif - if (mExchangeMgr) - { - // Ensure that any exchange contexts we have open get closed now, - // because we don't want them to call back in to us after this - // point. - mExchangeMgr->CloseAllContextsForDelegate(this); - } - mExchangeMgr = nullptr; - - ReleaseDAC(); - ReleasePAI(); -} - -CHIP_ERROR Device::LoadSecureSessionParameters() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - PASESession pairingSession; - - if (mSessionManager == nullptr || mState == ConnectionState::SecureConnected) - { - ExitNow(err = CHIP_ERROR_INCORRECT_STATE); - } - - if (mState == ConnectionState::Connecting) - { - ExitNow(err = CHIP_NO_ERROR); - } - - if (IsOperationalCertProvisioned()) - { - err = WarmupCASESession(); - SuccessOrExit(err); - } - else - { - err = pairingSession.FromSerializable(mPairing); - SuccessOrExit(err); - - err = mSessionManager->NewPairing(Optional::Value(mDeviceAddress), mDeviceId, &pairingSession, - CryptoContext::SessionRole::kInitiator, mFabricIndex); - SuccessOrExit(err); - } - -exit: - - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "LoadSecureSessionParameters returning error %" CHIP_ERROR_FORMAT, err.Format()); - } - return err; -} - -bool Device::GetAddress(Inet::IPAddress & addr, uint16_t & port) const -{ - if (mState == ConnectionState::NotConnected) - return false; - - addr = mDeviceAddress.GetIPAddress(); - port = mDeviceAddress.GetPort(); - return true; -} - -void Device::OperationalCertProvisioned() -{ - VerifyOrReturn(!mDeviceOperationalCertProvisioned, - ChipLogDetail(Controller, "Operational certificates already provisioned for this device")); - - ChipLogDetail(Controller, "Enabling CASE session establishment for the device"); - mDeviceOperationalCertProvisioned = true; - - Persist(); - CloseSession(); - mState = ConnectionState::NotConnected; -} - -CHIP_ERROR Device::WarmupCASESession() -{ - VerifyOrReturnError(mDeviceOperationalCertProvisioned, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mState == ConnectionState::NotConnected, CHIP_NO_ERROR); - - // Create a UnauthenticatedSession for CASE pairing. - // Don't use mSecureSession here, because mSecureSession is the secure session. - Optional session = mSessionManager->CreateUnauthenticatedSession(mDeviceAddress); - if (!session.HasValue()) - { - return CHIP_ERROR_NO_MEMORY; - } - - session.Value().GetUnauthenticatedSession()->SetMRPIntervals(mMrpIdleInterval, mMrpActiveInterval); - - Messaging::ExchangeContext * exchange = mExchangeMgr->NewContext(session.Value(), &mCASESession); - VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL); - - ReturnErrorOnFailure(mCASESession.MessageDispatch().Init(mSessionManager)); - - uint16_t keyID = 0; - ReturnErrorOnFailure(mIDAllocator->Allocate(keyID)); - - mLocalMessageCounter = 0; - mPeerMessageCounter = 0; - - FabricInfo * fabric = mFabricsTable->FindFabricWithIndex(mFabricIndex); - ReturnErrorCodeIf(fabric == nullptr, CHIP_ERROR_INCORRECT_STATE); - - ReturnErrorOnFailure(mCASESession.EstablishSession(mDeviceAddress, fabric, mDeviceId, keyID, exchange, this)); - - mState = ConnectionState::Connecting; - - return CHIP_NO_ERROR; -} - -void Device::OnSessionEstablishmentError(CHIP_ERROR error) -{ - mState = ConnectionState::NotConnected; - mIDAllocator->Free(mCASESession.GetLocalSessionId()); - - Cancelable ready; - mConnectionFailure.DequeueAll(ready); - while (ready.mNext != &ready) - { - Callback::Callback * cb = - Callback::Callback::FromCancelable(ready.mNext); - - cb->Cancel(); - cb->mCall(cb->mContext, GetDeviceId(), error); - } -} - -void Device::OnSessionEstablished() -{ - CHIP_ERROR err = mSessionManager->NewPairing(Optional::Value(mDeviceAddress), mDeviceId, &mCASESession, - CryptoContext::SessionRole::kInitiator, mFabricIndex); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "Failed in setting up CASE secure channel: err %s", ErrorStr(err)); - OnSessionEstablishmentError(err); - return; - } - - Cancelable ready; - mConnectionSuccess.DequeueAll(ready); - while (ready.mNext != &ready) - { - Callback::Callback * cb = Callback::Callback::FromCancelable(ready.mNext); - - cb->Cancel(); - cb->mCall(cb->mContext, this); - } -} - -void Device::ReleaseDAC() -{ - if (mDAC != nullptr) - { - Platform::MemoryFree(mDAC); - } - mDACLen = 0; - mDAC = nullptr; -} - -CHIP_ERROR Device::SetDAC(const ByteSpan & dac) -{ - if (dac.size() == 0) - { - ReleaseDAC(); - return CHIP_NO_ERROR; - } - - VerifyOrReturnError(dac.size() <= Credentials::kMaxDERCertLength, CHIP_ERROR_INVALID_ARGUMENT); - if (mDACLen != 0) - { - ReleaseDAC(); - } - - VerifyOrReturnError(CanCastTo(dac.size()), CHIP_ERROR_INVALID_ARGUMENT); - if (mDAC == nullptr) - { - mDAC = static_cast(chip::Platform::MemoryAlloc(dac.size())); - } - VerifyOrReturnError(mDAC != nullptr, CHIP_ERROR_NO_MEMORY); - mDACLen = static_cast(dac.size()); - memcpy(mDAC, dac.data(), mDACLen); - - return CHIP_NO_ERROR; -} - -void Device::ReleasePAI() -{ - if (mPAI != nullptr) - { - chip::Platform::MemoryFree(mPAI); - } - mPAILen = 0; - mPAI = nullptr; -} - -CHIP_ERROR Device::SetPAI(const chip::ByteSpan & pai) -{ - if (pai.size() == 0) - { - ReleasePAI(); - return CHIP_NO_ERROR; - } - - VerifyOrReturnError(pai.size() <= Credentials::kMaxDERCertLength, CHIP_ERROR_INVALID_ARGUMENT); - if (mPAILen != 0) - { - ReleasePAI(); - } - - VerifyOrReturnError(CanCastTo(pai.size()), CHIP_ERROR_INVALID_ARGUMENT); - if (mPAI == nullptr) - { - mPAI = static_cast(chip::Platform::MemoryAlloc(pai.size())); - } - VerifyOrReturnError(mPAI != nullptr, CHIP_ERROR_NO_MEMORY); - mPAILen = static_cast(pai.size()); - memcpy(mPAI, pai.data(), mPAILen); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::EstablishConnectivity(Callback::Callback * onConnection, - Callback::Callback * onFailure) -{ - bool loadedSecureSession = false; - ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(loadedSecureSession)); - - if (loadedSecureSession) - { - if (IsOperationalCertProvisioned()) - { - if (onConnection != nullptr) - { - mConnectionSuccess.Enqueue(onConnection->Cancel()); - } - - if (onFailure != nullptr) - { - mConnectionFailure.Enqueue(onFailure->Cancel()); - } - } - else - { - if (onConnection != nullptr) - { - onConnection->mCall(onConnection->mContext, this); - } - } - } - - return CHIP_NO_ERROR; -} - -void Device::AddIMResponseHandler(void * commandObj, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, app::TLVDataFilter tlvDataFilter) -{ - // Interaction model uses the object instead of a sequence number as the identifier of transactions. - // Since the objects can be identified by its pointer which fits into a uint64 value (the type of NodeId), we use it for the - // "node id" field in callback manager. - static_assert(std::is_same::value, "chip::NodeId is not uint64_t"); - chip::NodeId transactionId = reinterpret_cast(commandObj); - mCallbacksMgr.AddResponseCallback(transactionId, 0 /* seqNum, always 0 for IM before #6559 */, onSuccessCallback, - onFailureCallback, tlvDataFilter); -} - -void Device::CancelIMResponseHandler(void * commandObj) -{ - // Interaction model uses the object instead of a sequence number as the identifier of transactions. - // Since the objects can be identified by its pointer which fits into a uint64 value (the type of NodeId), we use it for the - // "node id" field in callback manager. - static_assert(std::is_same::value, "chip::NodeId is not uint64_t"); - chip::NodeId transactionId = reinterpret_cast(commandObj); - mCallbacksMgr.CancelResponseCallback(transactionId, 0 /* seqNum, always 0 for IM before #6559 */); -} - -void Device::AddReportHandler(EndpointId endpoint, ClusterId cluster, AttributeId attribute, - Callback::Cancelable * onReportCallback, app::TLVDataFilter tlvDataFilter) -{ - mCallbacksMgr.AddReportCallback(mDeviceId, endpoint, cluster, attribute, onReportCallback, tlvDataFilter); -} - -CHIP_ERROR Device::SendReadAttributeRequest(app::AttributePathParams aPath, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, app::TLVDataFilter aTlvDataFilter) -{ - bool loadedSecureSession = false; - - ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(loadedSecureSession)); - VerifyOrReturnError(mState == ConnectionState::SecureConnected, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(GetSecureSession().HasValue(), CHIP_ERROR_INCORRECT_STATE); - - app::ReadClient * readClient = nullptr; - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->NewReadClient( - &readClient, app::ReadClient::InteractionType::Read, mpIMDelegate)); - - if (onSuccessCallback != nullptr || onFailureCallback != nullptr) - { - AddIMResponseHandler(readClient, onSuccessCallback, onFailureCallback, aTlvDataFilter); - } - // The application context is used to identify different requests from client application the type of it is intptr_t, here we - // use the seqNum. - chip::app::ReadPrepareParams readPrepareParams(mSecureSession.Value()); - readPrepareParams.mpAttributePathParamsList = &aPath; - readPrepareParams.mAttributePathParamsListSize = 1; - - CHIP_ERROR err = readClient->SendReadRequest(readPrepareParams); - if (err != CHIP_NO_ERROR) - { - CancelIMResponseHandler(readClient); - } - return err; -} - -CHIP_ERROR Device::SendSubscribeAttributeRequest(app::AttributePathParams aPath, uint16_t mMinIntervalFloorSeconds, - uint16_t mMaxIntervalCeilingSeconds, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - bool loadedSecureSession = false; - - ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(loadedSecureSession)); - - app::ReadClient * readClient = nullptr; - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->NewReadClient( - &readClient, app::ReadClient::InteractionType::Subscribe, mpIMDelegate)); - - app::AttributePathParams * path = mpIMDelegate->AllocateAttributePathParam(1, reinterpret_cast(readClient)); - - VerifyOrReturnError(path != nullptr, CHIP_ERROR_NO_MEMORY); - - *path = aPath; - - // The application context is used to identify different requests from client application the type of it is intptr_t, here we - // use the seqNum. - VerifyOrReturnError(GetSecureSession().HasValue(), CHIP_ERROR_INCORRECT_STATE); - app::ReadPrepareParams params(GetSecureSession().Value()); - params.mpAttributePathParamsList = path; - params.mAttributePathParamsListSize = 1; - params.mMinIntervalFloorSeconds = mMinIntervalFloorSeconds; - params.mMaxIntervalCeilingSeconds = mMaxIntervalCeilingSeconds; - params.mKeepSubscriptions = false; - - CHIP_ERROR err = readClient->SendSubscribeRequest(params); - if (err != CHIP_NO_ERROR) - { - mpIMDelegate->FreeAttributePathParam(reinterpret_cast(readClient)); - readClient->Shutdown(); - return err; - } - - if (onSuccessCallback != nullptr || onFailureCallback != nullptr) - { - AddIMResponseHandler(readClient, onSuccessCallback, onFailureCallback); - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::ShutdownSubscriptions() -{ - return app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(mFabricIndex, mDeviceId); -} - -CHIP_ERROR Device::SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - bool loadedSecureSession = false; - CHIP_ERROR err = CHIP_NO_ERROR; - - ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(loadedSecureSession)); - VerifyOrReturnError(mState == ConnectionState::SecureConnected, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(GetSecureSession().HasValue(), CHIP_ERROR_INCORRECT_STATE); - - app::WriteClient * writeClient = aHandle.Get(); - - if (onSuccessCallback != nullptr || onFailureCallback != nullptr) - { - AddIMResponseHandler(writeClient, onSuccessCallback, onFailureCallback); - } - if ((err = aHandle.SendWriteRequest(mSecureSession.Value())) != CHIP_NO_ERROR) - { - CancelIMResponseHandler(writeClient); - } - return err; -} - -Device::~Device() -{ - if (mExchangeMgr) - { - // Ensure that any exchange contexts we have open get closed now, - // because we don't want them to call back in to us after this - // point. - mExchangeMgr->CloseAllContextsForDelegate(this); - } - - ReleaseDAC(); - ReleasePAI(); -} - -CHIP_ERROR Device::SetNOCCertBufferSize(size_t new_size) -{ - ReturnErrorCodeIf(new_size > sizeof(mNOCCertBuffer), CHIP_ERROR_INVALID_ARGUMENT); - mNOCCertBufferSize = new_size; - return CHIP_NO_ERROR; -} - -CHIP_ERROR Device::SetICACertBufferSize(size_t new_size) -{ - ReturnErrorCodeIf(new_size > sizeof(mICACertBuffer), CHIP_ERROR_INVALID_ARGUMENT); - mICACertBufferSize = new_size; - return CHIP_NO_ERROR; -} - -} // namespace Controller -} // namespace chip diff --git a/src/controller/CHIPDevice.h b/src/controller/CHIPDevice.h deleted file mode 100644 index 4b4922795ddbc1..00000000000000 --- a/src/controller/CHIPDevice.h +++ /dev/null @@ -1,661 +0,0 @@ -/* - * - * Copyright (c) 2020-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. - */ - -/** - * @file - * This file contains definitions for Device class. The objects of this - * class will be used by Controller applications to interact with CHIP - * devices. The class provides mechanism to construct, send and receive - * messages to and from the corresponding CHIP devices. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if CONFIG_NETWORK_LAYER_BLE -#include -#include -#endif - -namespace chip { -namespace Controller { - -class DeviceController; -class DeviceStatusDelegate; -struct SerializedDevice; - -constexpr size_t kMaxBlePendingPackets = 1; -constexpr size_t kOpCSRNonceLength = 32; -constexpr size_t kAttestationNonceLength = 32; - -using DeviceTransportMgr = TransportMgr /* BLE */ -#endif - >; - -using DeviceIPTransportMgr = TransportMgr; - -struct ControllerDeviceInitParams -{ - DeviceTransportMgr * transportMgr = nullptr; - SessionManager * sessionManager = nullptr; - Messaging::ExchangeManager * exchangeMgr = nullptr; - Inet::InetLayer * inetLayer = nullptr; - PersistentStorageDelegate * storageDelegate = nullptr; - SessionIDAllocator * idAllocator = nullptr; -#if CONFIG_NETWORK_LAYER_BLE - Ble::BleLayer * bleLayer = nullptr; -#endif - FabricTable * fabricsTable = nullptr; - DeviceControllerInteractionModelDelegate * imDelegate = nullptr; -}; - -class Device; - -typedef void (*OnDeviceConnected)(void * context, Device * device); -typedef void (*OnDeviceConnectionFailure)(void * context, NodeId deviceId, CHIP_ERROR error); -typedef void (*OnOpenCommissioningWindow)(void * context, NodeId deviceId, CHIP_ERROR status, SetupPayload payload); - -class Device : public Messaging::ExchangeDelegate, public SessionEstablishmentDelegate -{ -public: - ~Device(); - Device() : - mOpenPairingSuccessCallback(OnOpenPairingWindowSuccessResponse, this), - mOpenPairingFailureCallback(OnOpenPairingWindowFailureResponse, this) - {} - Device(const Device &) = delete; - - enum class CommissioningWindowOption - { - kOriginalSetupCode = 0, - kTokenWithRandomPIN, - kTokenWithProvidedPIN, - }; - - /** - * @brief - * Set the delegate object which will be called when a message is received. - * The user of this Device object must reset the delegate (by calling - * SetDelegate(nullptr)) before releasing their delegate object. - * - * @param[in] delegate The pointer to the delegate object. - */ - void SetDelegate(DeviceStatusDelegate * delegate) { mStatusDelegate = delegate; } - - // ----- Messaging ----- - CHIP_ERROR SendReadAttributeRequest(app::AttributePathParams aPath, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, app::TLVDataFilter aTlvDataFilter); - - CHIP_ERROR SendSubscribeAttributeRequest(app::AttributePathParams aPath, uint16_t mMinIntervalFloorSeconds, - uint16_t mMaxIntervalCeilingSeconds, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback); - CHIP_ERROR ShutdownSubscriptions(); - - CHIP_ERROR SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback); - - /** - * @brief - * Send the command in internal command sender. - */ - CHIP_ERROR SendCommands(app::CommandSender * commandObj); - - /** - * @brief Get the IP address and port assigned to the device. - * - * @param[out] addr IP address of the device. - * @param[out] port Port number of the device. - * - * @return true, if the IP address and port were filled in the out parameters, false otherwise - */ - bool GetAddress(Inet::IPAddress & addr, uint16_t & port) const; - - /** - * @brief - * Initialize the device object with secure session manager and inet layer object - * references. This variant of function is typically used when the device object - * is created from a serialized device information. The other parameters (address, port, - * interface etc) are part of the serialized device, so those are not required to be - * initialized. - * - * Note: The lifetime of session manager and inet layer objects must be longer than - * that of this device object. If these objects are freed, while the device object is - * still using them, it can lead to unknown behavior and crashes. - * - * @param[in] params Wrapper object for transport manager etc. - * @param[in] fabric Local administrator that's initializing this device object - */ - void Init(ControllerDeviceInitParams params, FabricIndex fabric) - { - mSessionManager = params.sessionManager; - mExchangeMgr = params.exchangeMgr; - mInetLayer = params.inetLayer; - mFabricIndex = fabric; - mStorageDelegate = params.storageDelegate; - mIDAllocator = params.idAllocator; - mFabricsTable = params.fabricsTable; - mpIMDelegate = params.imDelegate; -#if CONFIG_NETWORK_LAYER_BLE - mBleLayer = params.bleLayer; -#endif - } - - /** - * @brief - * Initialize a new device object with secure session manager, inet layer object, - * and other device specific parameters. This variant of function is typically used when - * a new device is paired, and the corresponding device object needs to updated with - * all device specifc parameters (address, port, interface etc). - * - * This is not done as part of constructor so that the controller can have a list of - * uninitialized/unpaired device objects. The object is initialized only when the device - * is actually paired. - * - * @param[in] params Wrapper object for transport manager etc. - * @param[in] deviceId Node ID of the device - * @param[in] peerAddress The location of the peer. MUST be of type Transport::Type::kUdp - * @param[in] fabric Local administrator that's initializing this device object - */ - void Init(ControllerDeviceInitParams params, NodeId deviceId, const Transport::PeerAddress & peerAddress, FabricIndex fabric) - { - Init(params, fabric); - mDeviceId = deviceId; - mState = ConnectionState::Connecting; - - mDeviceAddress = peerAddress; - } - - /** @brief Serialize the Pairing Session to a string. It's guaranteed that the string - * will be null terminated, and there won't be any embedded null characters. - * - * @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise - **/ - CHIP_ERROR Serialize(SerializedDevice & output); - - /** @brief Deserialize the Pairing Session from the string. It's expected that the string - * will be null terminated, and there won't be any embedded null characters. - * - * @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise - **/ - CHIP_ERROR Deserialize(const SerializedDevice & input); - - /** - * @brief Serialize and store the Device in persistent storage - * - * @return Returns a CHIP_ERROR if either serialization or storage fails - */ - CHIP_ERROR Persist(); - - /** - * @brief - * Called when a new pairing is being established - * - * @param session A handle to the secure session - */ - void OnNewConnection(SessionHandle session); - - /** - * @brief - * Called when a connection is closing. - * - * The receiver should release all resources associated with the connection. - * - * @param session A handle to the secure session - */ - void OnConnectionExpired(SessionHandle session); - - /** - * @brief - * This function is called when a message is received from the corresponding CHIP - * device. The message ownership is transferred to the function, and it is expected - * to release the message buffer before returning. - * - * @param[in] exchange The exchange context the message was received - * on. The Device guarantees that it will call - * Close() on exchange when it's done processing - * the message. - * @param[in] payloadHeader Reference to payload header in the message - * @param[in] msgBuf The message buffer - */ - CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * exchange, const PayloadHeader & payloadHeader, - System::PacketBufferHandle && msgBuf) override; - - /** - * @brief ExchangeDelegate implementation of OnResponseTimeout. - */ - void OnResponseTimeout(Messaging::ExchangeContext * exchange) override; - - /** - * @brief - * Trigger a paired device to re-enter the commissioning mode. If an onboarding token is provided, the device will use - * the provided setup PIN code and the discriminator to advertise itself for commissioning availability. If the token - * is not provided, the device will use the manufacturer assigned setup PIN code and discriminator. - * - * The device will exit the commissioning mode after a successful commissioning, or after the given `timeout` time. - * - * @param[in] timeout The commissioning mode should terminate after this much time. - * @param[in] iteration The PAKE iteration count associated with the PAKE Passcode ID and ephemeral - * PAKE passcode verifier to be used for this commissioning. - * @param[in] option The commissioning window can be opened using the original setup code, or an - * onboarding token can be generated using a random setup PIN code (or with - * the PIN code provied in the setupPayload). - * @param[in] salt The PAKE Salt associated with the PAKE Passcode ID and ephemeral PAKE passcode - * verifier to be used for this commissioning. - * @param[in] callback The function to be called on success or failure of opening of commissioning window. - * @param[out] setupPayload The setup payload corresponding to the generated onboarding token. - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error - */ - CHIP_ERROR OpenCommissioningWindow(uint16_t timeout, uint32_t iteration, CommissioningWindowOption option, - const ByteSpan & salt, Callback::Callback * callback, - SetupPayload & setupPayload); - - /** - * @brief - * Trigger a paired device to re-enter the commissioning mode. If an onboarding token is provided, the device will use - * the provided setup PIN code and the discriminator to advertise itself for commissioning availability. If the token - * is not provided, the device will use the manufacturer assigned setup PIN code and discriminator. - * - * The device will exit the commissioning mode after a successful commissioning, or after the given `timeout` time. - * - * @param[in] timeout The commissioning mode should terminate after this much time. - * @param[in] option The commissioning window can be opened using the original setup code, or an - * onboarding token can be generated using a random setup PIN code (or with - * the PIN code provied in the setupPayload). This argument selects one of these - * methods. - * @param[out] setupPayload The setup payload corresponding to the generated onboarding token. - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error - */ - CHIP_ERROR OpenPairingWindow(uint16_t timeout, CommissioningWindowOption option, SetupPayload & setupPayload); - - /** - * @brief - * Compute a PASE verifier and passcode ID for the desired setup pincode. - * - * This can be used to open a commissioning window on the device for - * additional administrator commissioning. - * - * @param[in] iterations The number of iterations to use when generating the verifier - * @param[in] setupPincode The desired PIN code to use - * @param[in] salt The 16-byte salt for verifier computation - * @param[out] outVerifier The PASEVerifier to be populated on success - * @param[out] outPasscodeId The passcode ID to be populated on success - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error - */ - CHIP_ERROR ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt, PASEVerifier & outVerifier, - uint32_t & outPasscodeId); - - // TODO: This is a workaround for OperationalDeviceProxy class to call OnNewConnection/OnConnectionExpired. Once - // https://github.com/project-chip/connectedhomeip/issues/10423 is complete, this function can be removed. - void UpdateSession(bool connected); - - /** - * In case there exists an open session to the device, mark it as expired. - */ - CHIP_ERROR CloseSession(); - - /** - * @brief - * Update data of the device. - * - * This function will set new IP address, port and MRP retransmission intervals of the device. - * Since the device settings might have been moved from RAM to the persistent storage, the function - * will load the device settings first, before making the changes. - * - * @param[in] addr Address of the device to be set. - * @param[in] mrpIdleInterval MRP idle retransmission interval of the device to be set. - * @param[in] mrpActiveInterval MRP active retransmision interval of the device to be set. - * - * @return CHIP_NO_ERROR if the data has been updated, an error code otherwise. - */ - CHIP_ERROR UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, uint32_t mrpActiveInterval); - /** - * @brief - * Return whether the current device object is actively associated with a paired CHIP - * device. An active object can be used to communicate with the corresponding device. - */ - bool IsActive() const { return mActive; } - - void SetActive(bool active) { mActive = active; } - - bool IsSecureConnected() const { return IsActive() && mState == ConnectionState::SecureConnected; } - - bool IsSessionSetupInProgress() const { return IsActive() && mState == ConnectionState::Connecting; } - - void Reset(); - - NodeId GetDeviceId() const { return mDeviceId; } - - bool MatchesSession(SessionHandle session) const { return mSecureSession.HasValue() && mSecureSession.Value() == session; } - - chip::Optional GetSecureSession() const { return mSecureSession; } - - Messaging::ExchangeManager * GetExchangeManager() const { return mExchangeMgr; } - - void SetAddress(const Inet::IPAddress & deviceAddr) { mDeviceAddress.SetIPAddress(deviceAddr); } - - void GetMRPIntervals(uint32_t & idleInterval, uint32_t & activeInterval) const - { - idleInterval = mMrpIdleInterval; - activeInterval = mMrpActiveInterval; - } - - PASESessionSerializable & GetPairing() { return mPairing; } - - uint8_t GetNextSequenceNumber() { return mSequenceNumber++; }; - void AddReportHandler(EndpointId endpoint, ClusterId cluster, AttributeId attribute, Callback::Cancelable * onReportCallback, - app::TLVDataFilter tlvDataFilter); - // Interaction model uses the object and callback interface instead of sequence number to mark different transactions. - void AddIMResponseHandler(void * commandObj, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - app::TLVDataFilter tlvDataFilter = nullptr); - void CancelIMResponseHandler(void * commandObj); - - void OperationalCertProvisioned(); - bool IsOperationalCertProvisioned() const { return mDeviceOperationalCertProvisioned; } - - CHIP_ERROR LoadSecureSessionParametersIfNeeded() - { - bool loadedSecureSession = false; - return LoadSecureSessionParametersIfNeeded(loadedSecureSession); - }; - - //////////// SessionEstablishmentDelegate Implementation /////////////// - void OnSessionEstablishmentError(CHIP_ERROR error) override; - void OnSessionEstablished() override; - - CASESession & GetCASESession() { return mCASESession; } - - CHIP_ERROR SetCSRNonce(ByteSpan csrNonce) - { - VerifyOrReturnError(csrNonce.size() == sizeof(mCSRNonce), CHIP_ERROR_INVALID_ARGUMENT); - memcpy(mCSRNonce, csrNonce.data(), csrNonce.size()); - return CHIP_NO_ERROR; - } - - ByteSpan GetCSRNonce() const { return ByteSpan(mCSRNonce, sizeof(mCSRNonce)); } - - CHIP_ERROR SetAttestationNonce(ByteSpan attestationNonce) - { - VerifyOrReturnError(attestationNonce.size() == sizeof(mAttestationNonce), CHIP_ERROR_INVALID_ARGUMENT); - memcpy(mAttestationNonce, attestationNonce.data(), attestationNonce.size()); - return CHIP_NO_ERROR; - } - - ByteSpan GetAttestationNonce() const { return ByteSpan(mAttestationNonce, sizeof(mAttestationNonce)); } - - bool AreCredentialsAvailable() const { return (mDAC != nullptr && mDACLen != 0); } - - ByteSpan GetDAC() const { return ByteSpan(mDAC, mDACLen); } - ByteSpan GetPAI() const { return ByteSpan(mPAI, mPAILen); } - - CHIP_ERROR SetDAC(const ByteSpan & dac); - CHIP_ERROR SetPAI(const ByteSpan & pai); - - MutableByteSpan GetMutableNOCCert() { return MutableByteSpan(mNOCCertBuffer, sizeof(mNOCCertBuffer)); } - - CHIP_ERROR SetNOCCertBufferSize(size_t new_size); - - ByteSpan GetNOCCert() const { return ByteSpan(mNOCCertBuffer, mNOCCertBufferSize); } - - MutableByteSpan GetMutableICACert() { return MutableByteSpan(mICACertBuffer, sizeof(mICACertBuffer)); } - - CHIP_ERROR SetICACertBufferSize(size_t new_size); - - ByteSpan GetICACert() const { return ByteSpan(mICACertBuffer, mICACertBufferSize); } - - /* - * This function can be called to establish a secure session with the device. - * - * If the device doesn't have operational credentials, and is under commissioning process, - * PASE keys will be used for secure session. - * - * If the device has been commissioned and has operational credentials, CASE session - * setup will be triggered. - * - * On establishing the session, the callback function `onConnection` will be called. If the - * session setup fails, `onFailure` will be called. - * - * If the session already exists, `onConnection` will be called immediately. - */ - CHIP_ERROR EstablishConnectivity(Callback::Callback * onConnection, - Callback::Callback * onFailure); - - DeviceControllerInteractionModelDelegate * GetInteractionModelDelegate() { return mpIMDelegate; }; - -private: - enum class ConnectionState - { - NotConnected, - Connecting, - SecureConnected, - }; - - enum class ResetTransport - { - kYes, - kNo, - }; - /* Node ID assigned to the CHIP device */ - NodeId mDeviceId; - - /** Address used to communicate with the device. - */ - Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); - - uint32_t mMrpIdleInterval = CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL; - uint32_t mMrpActiveInterval = CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL; - - Inet::InetLayer * mInetLayer = nullptr; - - bool mActive = false; - ConnectionState mState = ConnectionState::NotConnected; - -#if CONFIG_NETWORK_LAYER_BLE - Ble::BleLayer * mBleLayer = nullptr; -#endif - - PASESessionSerializable mPairing; - - DeviceStatusDelegate * mStatusDelegate = nullptr; - - SessionManager * mSessionManager = nullptr; - - Messaging::ExchangeManager * mExchangeMgr = nullptr; - - Optional mSecureSession = Optional::Missing(); - - DeviceControllerInteractionModelDelegate * mpIMDelegate = nullptr; - - uint8_t mSequenceNumber = 0; - - uint32_t mLocalMessageCounter = 0; - uint32_t mPeerMessageCounter = 0; - - app::CHIPDeviceCallbacksMgr & mCallbacksMgr = app::CHIPDeviceCallbacksMgr::GetInstance(); - - /** - * @brief - * This function loads the secure session object from the serialized operational - * credentials corresponding to the device. This is typically done when the device - * does not have an active secure channel. - */ - CHIP_ERROR LoadSecureSessionParameters(); - - /** - * @brief - * This function loads the secure session object from the serialized operational - * credentials corresponding if needed, based on the current state of the device and - * underlying transport object. - * - * @param[out] didLoad Were the secure session params loaded by the call to this function. - */ - CHIP_ERROR LoadSecureSessionParametersIfNeeded(bool & didLoad); - - /** - * This function triggers CASE session setup if the device has been provisioned with - * operational credentials, and there is no currently active session. - */ - - CHIP_ERROR WarmupCASESession(); - - void ReleaseDAC(); - void ReleasePAI(); - - static void OnOpenPairingWindowSuccessResponse(void * context); - static void OnOpenPairingWindowFailureResponse(void * context, uint8_t status); - - FabricIndex mFabricIndex = kUndefinedFabricIndex; - - FabricTable * mFabricsTable = nullptr; - - bool mDeviceOperationalCertProvisioned = false; - - CASESession mCASESession; - PersistentStorageDelegate * mStorageDelegate = nullptr; - - // TODO: Offload Nonces and DAC/PAI into a new struct - uint8_t mCSRNonce[kOpCSRNonceLength]; - uint8_t mAttestationNonce[kAttestationNonceLength]; - - uint8_t * mDAC = nullptr; - uint16_t mDACLen = 0; - uint8_t * mPAI = nullptr; - uint16_t mPAILen = 0; - - uint8_t mNOCCertBuffer[Credentials::kMaxCHIPCertLength]; - size_t mNOCCertBufferSize = 0; - - uint8_t mICACertBuffer[Credentials::kMaxCHIPCertLength]; - size_t mICACertBufferSize = 0; - - SessionIDAllocator * mIDAllocator = nullptr; - - uint16_t mPAKEVerifierID = 1; - - Callback::CallbackDeque mConnectionSuccess; - Callback::CallbackDeque mConnectionFailure; - - Callback::Callback * mCommissioningWindowCallback = nullptr; - SetupPayload mSetupPayload; - - Callback::Callback mOpenPairingSuccessCallback; - Callback::Callback mOpenPairingFailureCallback; -}; - -/** - * This class defines an interface for an object that the user of Device - * can register as a delegate. The delegate object will be called by the - * Device when a new message or status update is received from the corresponding - * CHIP device. - */ -class DeviceStatusDelegate -{ -public: - virtual ~DeviceStatusDelegate() {} - - /** - * @brief - * Called when a message is received from the device. - * - * @param[in] msg Received message buffer. - */ - virtual void OnMessage(System::PacketBufferHandle && msg) = 0; - - /** - * @brief - * Called when response to OpenPairingWindow is received from the device. - * - * @param[in] status CHIP_NO_ERROR on success, or corresponding error. - */ - virtual void OnPairingWindowOpenStatus(CHIP_ERROR status){}; - - /** - * @brief - * Called when device status is updated. - * - */ - virtual void OnStatusChange(void){}; -}; - -#ifdef IFNAMSIZ -constexpr uint16_t kMaxInterfaceName = IFNAMSIZ; -#else -constexpr uint16_t kMaxInterfaceName = 32; -#endif - -typedef struct SerializableDevice -{ - PASESessionSerializable mOpsCreds; - uint64_t mDeviceId; /* This field is serialized in LittleEndian byte order */ - uint8_t mDeviceAddr[INET6_ADDRSTRLEN]; - uint16_t mDevicePort; /* This field is serialized in LittleEndian byte order */ - uint16_t mFabricIndex; /* This field is serialized in LittleEndian byte order */ - uint8_t mDeviceTransport; - uint8_t mDeviceOperationalCertProvisioned; - uint8_t mInterfaceName[kMaxInterfaceName]; - uint32_t mLocalMessageCounter; /* This field is serialized in LittleEndian byte order */ - uint32_t mPeerMessageCounter; /* This field is serialized in LittleEndian byte order */ -} SerializableDevice; - -typedef struct SerializedDevice -{ - // Extra uint64_t to account for padding bytes (NULL termination, and some decoding overheads) - // The encoder may not include a NULL character, and there are maximum 2 bytes of padding. - // So extra 8 bytes should be sufficient to absorb this overhead. - uint8_t inner[BASE64_ENCODED_LEN(sizeof(SerializableDevice) + sizeof(uint64_t))]; -} SerializedDevice; - -} // namespace Controller -} // namespace chip diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index d4ccd3c41f6eb8..fad37bdd3fccb8 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -44,6 +44,7 @@ #endif #include +#include #include #include #include @@ -106,7 +107,9 @@ using namespace chip::Protocols::UserDirectedCommissioning; constexpr uint32_t kSessionEstablishmentTimeout = 30 * kMillisecondsPerSecond; -DeviceController::DeviceController() +DeviceController::DeviceController() : + mOpenPairingSuccessCallback(OnOpenPairingWindowSuccessResponse, this), + mOpenPairingFailureCallback(OnOpenPairingWindowFailureResponse, this) { mState = State::NotInitialized; mStorageDelegate = nullptr; @@ -150,7 +153,6 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params) mSystemState = params.systemState->Retain(); mState = State::Initialized; - ReleaseAllDevices(); return CHIP_NO_ERROR; } @@ -209,11 +211,6 @@ CHIP_ERROR DeviceController::Shutdown() ChipLogDetail(Controller, "Shutting down the controller"); - for (uint32_t i = 0; i < kNumMaxActiveDevices; i++) - { - mActiveDevices[i].Reset(); - } - mState = State::NotInitialized; #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD @@ -222,8 +219,6 @@ CHIP_ERROR DeviceController::Shutdown() mStorageDelegate = nullptr; - ReleaseAllDevices(); - mSystemState->Fabrics()->ReleaseFabricIndex(mFabricIndex); mSystemState->Release(); mSystemState = nullptr; @@ -237,56 +232,6 @@ CHIP_ERROR DeviceController::Shutdown() return CHIP_NO_ERROR; } -CHIP_ERROR DeviceController::GetDevice(NodeId deviceId, Device ** out_device) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - Device * device = nullptr; - uint16_t index = 0; - - VerifyOrExit(out_device != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); - index = FindDeviceIndex(deviceId); - - if (index < kNumMaxActiveDevices) - { - device = &mActiveDevices[index]; - } - else - { - err = InitializePairedDeviceList(); - SuccessOrExit(err); - - VerifyOrExit(mPairedDevices.Contains(deviceId), err = CHIP_ERROR_NOT_CONNECTED); - - index = GetInactiveDeviceIndex(); - VerifyOrExit(index < kNumMaxActiveDevices, err = CHIP_ERROR_NO_MEMORY); - device = &mActiveDevices[index]; - - { - SerializedDevice deviceInfo; - uint16_t size = sizeof(deviceInfo.inner); - - PERSISTENT_KEY_OP(deviceId, kPairedDeviceKeyPrefix, key, - err = mStorageDelegate->SyncGetKeyValue(key, deviceInfo.inner, size)); - SuccessOrExit(err); - VerifyOrExit(size <= sizeof(deviceInfo.inner), err = CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR); - - err = device->Deserialize(deviceInfo); - VerifyOrExit(err == CHIP_NO_ERROR, ReleaseDevice(device)); - - device->Init(GetControllerDeviceInitParams(), mFabricIndex); - } - } - - *out_device = device; - -exit: - if (err != CHIP_NO_ERROR && device != nullptr) - { - ReleaseDevice(device); - } - return err; -} - bool DeviceController::DoesDevicePairingExist(const PeerId & deviceId) { if (InitializePairedDeviceList() == CHIP_NO_ERROR) @@ -297,28 +242,52 @@ bool DeviceController::DoesDevicePairingExist(const PeerId & deviceId) return false; } -CHIP_ERROR DeviceController::GetConnectedDevice(NodeId deviceId, Callback::Callback * onConnection, - Callback::Callback * onFailure) +CHIP_ERROR DeviceController::GetOperationalDeviceWithAddress(NodeId deviceId, const Transport::PeerAddress & addr, + Callback::Callback * onConnection, + Callback::Callback * onFailure) { - CHIP_ERROR err = CHIP_NO_ERROR; - Device * device = nullptr; + OperationalDeviceProxy * device = FindOperationalDevice(deviceId); + if (device == nullptr) + { + FabricInfo * fabric = mSystemState->Fabrics()->FindFabricWithIndex(mFabricIndex); + VerifyOrReturnError(fabric != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + DeviceProxyInitParams initParams = { + .sessionManager = mSystemState->SessionMgr(), + .exchangeMgr = mSystemState->ExchangeMgr(), + .idAllocator = &mIDAllocator, + .fabricInfo = fabric, + .imDelegate = mSystemState->IMDelegate(), + }; - err = GetDevice(deviceId, &device); - SuccessOrExit(err); + PeerId peerID = fabric->GetPeerId(); + peerID.SetNodeId(deviceId); - if (device->IsSecureConnected()) - { - onConnection->mCall(onConnection->mContext, device); - return CHIP_NO_ERROR; + device = mOperationalDevices.CreateObject(initParams, peerID); + if (device == nullptr) + { + onFailure->mCall(onFailure->mContext, deviceId, CHIP_ERROR_NO_MEMORY); + return CHIP_ERROR_NO_MEMORY; + } } - err = device->EstablishConnectivity(onConnection, onFailure); - SuccessOrExit(err); + CHIP_ERROR err = CHIP_NO_ERROR; + if (addr != Transport::PeerAddress::UDP(Inet::IPAddress::Any)) + { + uint32_t idleInterval; + uint32_t activeInterval; + device->GetMRPIntervals(idleInterval, activeInterval); + err = device->UpdateDeviceData(addr, idleInterval, activeInterval); + if (err != CHIP_NO_ERROR) + { + ReleaseOperationalDevice(device); + return err; + } + } -exit: + err = device->Connect(onConnection, onFailure); if (err != CHIP_NO_ERROR) { - onFailure->mCall(onFailure->mContext, deviceId, err); + ReleaseOperationalDevice(device); } return err; @@ -334,30 +303,18 @@ CHIP_ERROR DeviceController::UpdateDevice(NodeId deviceId) #endif // CHIP_DEVICE_CONFIG_ENABLE_DNSSD } -void DeviceController::PersistDevice(Device * device) -{ - if (mState == State::Initialized) - { - device->Persist(); - } - else - { - ChipLogError(Controller, "Failed to persist device. Controller not initialized."); - } -} - CHIP_ERROR DeviceController::OnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, System::PacketBufferHandle && msgBuf) { - uint16_t index; + OperationalDeviceProxy * device = nullptr; VerifyOrExit(mState == State::Initialized, ChipLogError(Controller, "OnMessageReceived was called in incorrect state")); VerifyOrExit(ec != nullptr, ChipLogError(Controller, "OnMessageReceived was called with null exchange")); - index = FindDeviceIndex(ec->GetSessionHandle().GetPeerNodeId()); - VerifyOrExit(index < kNumMaxActiveDevices, ChipLogError(Controller, "OnMessageReceived was called for unknown device object")); + device = FindOperationalDevice(ec->GetSessionHandle()); + VerifyOrExit(device != nullptr, ChipLogError(Controller, "OnMessageReceived was called for unknown device object")); - mActiveDevices[index].OnMessageReceived(ec, payloadHeader, std::move(msgBuf)); + device->OnMessageReceived(ec, payloadHeader, std::move(msgBuf)); exit: return CHIP_NO_ERROR; @@ -369,99 +326,56 @@ void DeviceController::OnResponseTimeout(Messaging::ExchangeContext * ec) ChipLogValueExchange(ec)); } -void DeviceController::OnNewConnection(SessionHandle session, Messaging::ExchangeManager * mgr) -{ - VerifyOrReturn(mState == State::Initialized, ChipLogError(Controller, "OnNewConnection was called in incorrect state")); - - uint16_t index = FindDeviceIndex(mgr->GetSessionManager()->GetSecureSession(session)->GetPeerNodeId()); - VerifyOrReturn(index < kNumMaxActiveDevices, - ChipLogDetail(Controller, "OnNewConnection was called for unknown device, ignoring it.")); - - mActiveDevices[index].OnNewConnection(session); -} +void DeviceController::OnNewConnection(SessionHandle session, Messaging::ExchangeManager * mgr) {} void DeviceController::OnConnectionExpired(SessionHandle session, Messaging::ExchangeManager * mgr) { VerifyOrReturn(mState == State::Initialized, ChipLogError(Controller, "OnConnectionExpired was called in incorrect state")); - uint16_t index = FindDeviceIndex(session); - VerifyOrReturn(index < kNumMaxActiveDevices, - ChipLogDetail(Controller, "OnConnectionExpired was called for unknown device, ignoring it.")); + OperationalDeviceProxy * device = FindOperationalDevice(session); + VerifyOrReturn(device != nullptr, ChipLogDetail(Controller, "OnConnectionExpired was called for unknown device, ignoring it.")); - mActiveDevices[index].OnConnectionExpired(session); + device->OnConnectionExpired(session); } -uint16_t DeviceController::GetInactiveDeviceIndex() +OperationalDeviceProxy * DeviceController::FindOperationalDevice(SessionHandle session) { - uint16_t i = 0; - while (i < kNumMaxActiveDevices && mActiveDevices[i].IsActive()) - i++; - if (i < kNumMaxActiveDevices) - { - mActiveDevices[i].SetActive(true); - } - - return i; -} + OperationalDeviceProxy * foundDevice = nullptr; + mOperationalDevices.ForEachActiveObject([&](auto * deviceProxy) { + if (deviceProxy->MatchesSession(session)) + { + foundDevice = deviceProxy; + return false; + } + return true; + }); -void DeviceController::ReleaseDevice(Device * device) -{ - device->Reset(); + return foundDevice; } -void DeviceController::ReleaseDevice(uint16_t index) +OperationalDeviceProxy * DeviceController::FindOperationalDevice(NodeId id) { - if (index < kNumMaxActiveDevices) - { - ReleaseDevice(&mActiveDevices[index]); - } -} - -void DeviceController::ReleaseDeviceById(NodeId remoteDeviceId) -{ - for (uint16_t i = 0; i < kNumMaxActiveDevices; i++) - { - if (mActiveDevices[i].GetDeviceId() == remoteDeviceId) + OperationalDeviceProxy * foundDevice = nullptr; + mOperationalDevices.ForEachActiveObject([&](auto * deviceProxy) { + if (deviceProxy->GetDeviceId() == id) { - ReleaseDevice(&mActiveDevices[i]); + foundDevice = deviceProxy; + return false; } - } -} + return true; + }); -void DeviceController::ReleaseAllDevices() -{ - for (uint16_t i = 0; i < kNumMaxActiveDevices; i++) - { - ReleaseDevice(&mActiveDevices[i]); - } + return foundDevice; } -uint16_t DeviceController::FindDeviceIndex(SessionHandle session) +void DeviceController::ReleaseOperationalDevice(NodeId id) { - uint16_t i = 0; - while (i < kNumMaxActiveDevices) - { - if (mActiveDevices[i].IsActive() && mActiveDevices[i].IsSecureConnected() && mActiveDevices[i].MatchesSession(session)) - { - return i; - } - i++; - } - return i; + ReleaseOperationalDevice(FindOperationalDevice(id)); } -uint16_t DeviceController::FindDeviceIndex(NodeId id) +void DeviceController::ReleaseOperationalDevice(OperationalDeviceProxy * device) { - uint16_t i = 0; - while (i < kNumMaxActiveDevices) - { - if (mActiveDevices[i].IsActive() && mActiveDevices[i].GetDeviceId() == id) - { - return i; - } - i++; - } - return i; + mOperationalDevices.ReleaseObject(device); } CHIP_ERROR DeviceController::InitializePairedDeviceList() @@ -534,22 +448,134 @@ void DeviceController::PersistNextKeyId() CHIP_ERROR DeviceController::GetPeerAddressAndPort(PeerId peerId, Inet::IPAddress & addr, uint16_t & port) { VerifyOrReturnError(GetCompressedFabricId() == peerId.GetCompressedFabricId(), CHIP_ERROR_INVALID_ARGUMENT); - uint16_t index = FindDeviceIndex(peerId.GetNodeId()); - VerifyOrReturnError(index < kNumMaxActiveDevices, CHIP_ERROR_NOT_CONNECTED); - VerifyOrReturnError(mActiveDevices[index].GetAddress(addr, port), CHIP_ERROR_NOT_CONNECTED); + OperationalDeviceProxy * device = FindOperationalDevice(peerId.GetNodeId()); + VerifyOrReturnError(device->GetAddress(addr, port), CHIP_ERROR_NOT_CONNECTED); + return CHIP_NO_ERROR; +} + +void DeviceController::OnOpenPairingWindowSuccessResponse(void * context) +{ + ChipLogProgress(Controller, "Successfully opened pairing window on the device"); + DeviceController * controller = reinterpret_cast(context); + if (controller->mCommissioningWindowCallback != nullptr) + { + controller->mCommissioningWindowCallback->mCall(controller->mCommissioningWindowCallback->mContext, + controller->mDeviceWithCommissioningWindowOpen, CHIP_NO_ERROR, + controller->mSetupPayload); + } +} + +void DeviceController::OnOpenPairingWindowFailureResponse(void * context, uint8_t status) +{ + ChipLogError(Controller, "Failed to open pairing window on the device. Status %d", status); + DeviceController * controller = reinterpret_cast(context); + if (controller->mCommissioningWindowCallback != nullptr) + { + CHIP_ERROR error = CHIP_ERROR_INVALID_PASE_PARAMETER; + // TODO - Use cluster enum chip::app::Clusters::AdministratorCommissioning::StatusCode::kBusy + if (status == 1) + { + error = CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS; + } + controller->mCommissioningWindowCallback->mCall(controller->mCommissioningWindowCallback->mContext, + controller->mDeviceWithCommissioningWindowOpen, error, SetupPayload()); + } +} + +CHIP_ERROR DeviceController::ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt, + PASEVerifier & outVerifier, uint32_t & outPasscodeId) +{ + ReturnErrorOnFailure(PASESession::GeneratePASEVerifier(outVerifier, iterations, salt, /* useRandomPIN= */ false, setupPincode)); + + outPasscodeId = mPAKEVerifierID++; + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceController::OpenCommissioningWindowWithCallback(NodeId deviceId, uint16_t timeout, uint16_t iteration, + uint16_t discriminator, uint8_t option, + Callback::Callback * callback) +{ + ChipLogProgress(Controller, "OpenCommissioningWindow for device ID %" PRIu64, deviceId); + VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); + + OperationalDeviceProxy * device = FindOperationalDevice(deviceId); + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + std::string QRCode; + std::string manualPairingCode; + SetupPayload payload; + CommissioningWindowOption commissioningWindowOption; + ByteSpan salt(reinterpret_cast(kSpake2pKeyExchangeSalt), strlen(kSpake2pKeyExchangeSalt)); + + payload.discriminator = discriminator; + + switch (option) + { + case 0: + commissioningWindowOption = CommissioningWindowOption::kOriginalSetupCode; + break; + case 1: + commissioningWindowOption = CommissioningWindowOption::kTokenWithRandomPIN; + break; + case 2: + commissioningWindowOption = CommissioningWindowOption::kTokenWithProvidedPIN; + break; + default: + ChipLogError(Controller, "Invalid Pairing Window option"); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + constexpr EndpointId kAdministratorCommissioningClusterEndpoint = 0; + + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, kAdministratorCommissioningClusterEndpoint); + + Callback::Cancelable * successCallback = mOpenPairingSuccessCallback.Cancel(); + Callback::Cancelable * failureCallback = mOpenPairingFailureCallback.Cancel(); + + payload.version = 0; + payload.rendezvousInformation = RendezvousInformationFlags(RendezvousInformationFlag::kOnNetwork); + + mCommissioningWindowCallback = callback; + if (commissioningWindowOption != CommissioningWindowOption::kOriginalSetupCode) + { + bool randomSetupPIN = (commissioningWindowOption == CommissioningWindowOption::kTokenWithRandomPIN); + PASEVerifier verifier; + + ReturnErrorOnFailure(PASESession::GeneratePASEVerifier(verifier, iteration, salt, randomSetupPIN, payload.setUpPINCode)); + + uint8_t serializedVerifier[2 * kSpake2p_WS_Length]; + VerifyOrReturnError(sizeof(serializedVerifier) == sizeof(verifier), CHIP_ERROR_INTERNAL); + + memcpy(serializedVerifier, verifier.mW0, kSpake2p_WS_Length); + memcpy(&serializedVerifier[kSpake2p_WS_Length], verifier.mL, kSpake2p_WS_Length); + + ReturnErrorOnFailure(cluster.OpenCommissioningWindow(successCallback, failureCallback, timeout, + ByteSpan(serializedVerifier, sizeof(serializedVerifier)), + payload.discriminator, iteration, salt, mPAKEVerifierID++)); + + ReturnErrorOnFailure(ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(manualPairingCode)); + ChipLogProgress(Controller, "Manual pairing code: [%s]", manualPairingCode.c_str()); + + ReturnErrorOnFailure(QRCodeSetupPayloadGenerator(payload).payloadBase38Representation(QRCode)); + ChipLogProgress(Controller, "SetupQRCode: [%s]", QRCode.c_str()); + } + else + { + ReturnErrorOnFailure(cluster.OpenBasicCommissioningWindow(successCallback, failureCallback, timeout)); + } + + mSetupPayload = payload; + mDeviceWithCommissioningWindowOpen = deviceId; + return CHIP_NO_ERROR; } #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD -void DeviceController::OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & nodeData) +Transport::PeerAddress DeviceController::ToPeerAddress(const chip::Dnssd::ResolvedNodeData & nodeData) const { - CHIP_ERROR err = CHIP_NO_ERROR; - Device * device = nullptr; Inet::InterfaceId interfaceId; - err = GetDevice(nodeData.mPeerId.GetNodeId(), &device); - SuccessOrExit(err); - // Only use the mDNS resolution's InterfaceID for addresses that are IPv6 LLA. // For all other addresses, we should rely on the device's routing table to route messages sent. // Forcing messages down an InterfaceId might fail. For example, in bridged networks like Thread, @@ -559,20 +585,22 @@ void DeviceController::OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & no interfaceId = nodeData.mInterfaceId; } - err = device->UpdateDeviceData(Transport::PeerAddress::UDP(nodeData.mAddress, nodeData.mPort, interfaceId), - nodeData.GetMrpRetryIntervalIdle().ValueOr(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL), - nodeData.GetMrpRetryIntervalActive().ValueOr(CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL)); - SuccessOrExit(err); + return Transport::PeerAddress::UDP(nodeData.mAddress, nodeData.mPort, interfaceId); +} - PersistDevice(device); +void DeviceController::OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & nodeData) +{ + OperationalDeviceProxy * device = FindOperationalDevice(nodeData.mPeerId.GetNodeId()); + VerifyOrReturn(device != nullptr); -exit: + CHIP_ERROR err = device->UpdateDeviceData( + ToPeerAddress(nodeData), nodeData.GetMrpRetryIntervalIdle().ValueOr(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL), + nodeData.GetMrpRetryIntervalActive().ValueOr(CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL)); if (mDeviceAddressUpdateDelegate != nullptr) { mDeviceAddressUpdateDelegate->OnAddressUpdateComplete(nodeData.mPeerId.GetNodeId(), err); } - return; }; void DeviceController::OnNodeIdResolutionFailed(const chip::PeerId & peer, CHIP_ERROR error) @@ -611,9 +639,9 @@ DeviceCommissioner::DeviceCommissioner() : mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this), mDeviceNOCChainCallback(OnDeviceNOCChainGeneration, this), mSetUpCodePairer(this) { - mPairingDelegate = nullptr; - mDeviceBeingPaired = kNumMaxActiveDevices; - mPairedDevicesUpdated = false; + mPairingDelegate = nullptr; + mPairedDevicesUpdated = false; + mDeviceBeingCommissioned = nullptr; } CHIP_ERROR DeviceCommissioner::Init(CommissionerInitParams params) @@ -662,10 +690,6 @@ CHIP_ERROR DeviceCommissioner::Shutdown() ChipLogDetail(Controller, "Shutting down the commissioner"); - mPairingSession.Clear(); - - PersistDeviceList(); - #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable if (mUdcTransportMgr != nullptr) { @@ -685,6 +709,84 @@ CHIP_ERROR DeviceCommissioner::Shutdown() return CHIP_NO_ERROR; } +void DeviceCommissioner::OnNewConnection(SessionHandle session, Messaging::ExchangeManager * mgr) +{ + VerifyOrReturn(mState == State::Initialized, ChipLogError(Controller, "OnNewConnection was called in incorrect state")); + + CommissioneeDeviceProxy * device = FindCommissioneeDevice(mgr->GetSessionManager()->GetSecureSession(session)->GetPeerNodeId()); + VerifyOrReturn(device != nullptr, ChipLogDetail(Controller, "OnNewConnection was called for unknown device, ignoring it.")); + + device->OnNewConnection(session); +} + +void DeviceCommissioner::OnConnectionExpired(SessionHandle session, Messaging::ExchangeManager * mgr) +{ + VerifyOrReturn(mState == State::Initialized, ChipLogError(Controller, "OnConnectionExpired was called in incorrect state")); + + CommissioneeDeviceProxy * device = FindCommissioneeDevice(session); + VerifyOrReturn(device != nullptr, ChipLogDetail(Controller, "OnConnectionExpired was called for unknown device, ignoring it.")); + + device->OnConnectionExpired(session); +} + +CommissioneeDeviceProxy * DeviceCommissioner::FindCommissioneeDevice(SessionHandle session) +{ + CommissioneeDeviceProxy * foundDevice = nullptr; + mCommissioneeDevicePool.ForEachActiveObject([&](auto * deviceProxy) { + if (deviceProxy->MatchesSession(session)) + { + foundDevice = deviceProxy; + return false; + } + return true; + }); + + return foundDevice; +} + +CommissioneeDeviceProxy * DeviceCommissioner::FindCommissioneeDevice(NodeId id) +{ + CommissioneeDeviceProxy * foundDevice = nullptr; + mCommissioneeDevicePool.ForEachActiveObject([&](auto * deviceProxy) { + if (deviceProxy->GetDeviceId() == id) + { + foundDevice = deviceProxy; + return false; + } + return true; + }); + + return foundDevice; +} + +void DeviceCommissioner::ReleaseCommissioneeDevice(CommissioneeDeviceProxy * device) +{ + mCommissioneeDevicePool.ReleaseObject(device); +} + +CHIP_ERROR DeviceCommissioner::GetDeviceBeingCommissioned(NodeId deviceId, CommissioneeDeviceProxy ** out_device) +{ + VerifyOrReturnError(out_device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + CommissioneeDeviceProxy * device = FindCommissioneeDevice(deviceId); + + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + *out_device = device; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceCommissioner::GetConnectedDevice(NodeId deviceId, Callback::Callback * onConnection, + Callback::Callback * onFailure) +{ + if (mDeviceBeingCommissioned != nullptr && mDeviceBeingCommissioned->GetDeviceId() == deviceId) + { + onConnection->mCall(onConnection->mContext, mDeviceBeingCommissioned); + return CHIP_NO_ERROR; + } + return DeviceController::GetConnectedDevice(deviceId, onConnection, onFailure); +} + CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, const char * setUpCode) { return mSetUpCodePairer.PairDevice(remoteDeviceId, setUpCode); @@ -693,7 +795,7 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, const char * se CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParameters & params) { CHIP_ERROR err = CHIP_NO_ERROR; - Device * device = nullptr; + CommissioneeDeviceProxy * device = nullptr; Transport::PeerAddress peerAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); uint32_t mrpIdleInterval, mrpActiveInterval; @@ -706,7 +808,7 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam VerifyOrExit(IsOperationalNodeId(remoteDeviceId), err = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(mState == State::Initialized, err = CHIP_ERROR_INCORRECT_STATE); - VerifyOrExit(mDeviceBeingPaired == kNumMaxActiveDevices, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mDeviceBeingCommissioned == nullptr, err = CHIP_ERROR_INCORRECT_STATE); VerifyOrExit(fabric != nullptr, err = CHIP_ERROR_INCORRECT_STATE); err = InitializePairedDeviceList(); @@ -731,9 +833,10 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam params.GetPeerAddress().GetInterface()); } - mDeviceBeingPaired = GetInactiveDeviceIndex(); - VerifyOrExit(mDeviceBeingPaired < kNumMaxActiveDevices, err = CHIP_ERROR_NO_MEMORY); - device = &mActiveDevices[mDeviceBeingPaired]; + device = mCommissioneeDevicePool.CreateObject(); + VerifyOrExit(device != nullptr, err = CHIP_ERROR_NO_MEMORY); + + mDeviceBeingCommissioned = device; // If the CSRNonce is passed in, using that else using a random one.. if (params.HasCSRNonce()) @@ -761,11 +864,11 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam mIsIPRendezvous = (params.GetPeerAddress().GetTransportType() != Transport::Type::kBle); - err = mPairingSession.MessageDispatch().Init(mSystemState->SessionMgr()); - SuccessOrExit(err); - device->Init(GetControllerDeviceInitParams(), remoteDeviceId, peerAddress, fabric->GetFabricIndex()); + err = device->GetPairing().MessageDispatch().Init(mSystemState->SessionMgr()); + SuccessOrExit(err); + mSystemState->SystemLayer()->StartTimer(chip::System::Clock::Milliseconds32(kSessionEstablishmentTimeout), OnSessionEstablishmentTimeoutCallback, this); if (params.GetPeerAddress().GetTransportType() != Transport::Type::kBle) @@ -796,13 +899,13 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam device->GetMRPIntervals(mrpIdleInterval, mrpActiveInterval); session.Value().GetUnauthenticatedSession()->SetMRPIntervals(mrpIdleInterval, mrpActiveInterval); - exchangeCtxt = mSystemState->ExchangeMgr()->NewContext(session.Value(), &mPairingSession); + exchangeCtxt = mSystemState->ExchangeMgr()->NewContext(session.Value(), &device->GetPairing()); VerifyOrExit(exchangeCtxt != nullptr, err = CHIP_ERROR_INTERNAL); err = mIDAllocator.Allocate(keyID); SuccessOrExit(err); - err = mPairingSession.Pair(params.GetPeerAddress(), params.GetSetupPINCode(), keyID, exchangeCtxt, this); + err = device->GetPairing().Pair(params.GetPeerAddress(), params.GetSetupPINCode(), keyID, exchangeCtxt, this); // Immediately persist the updted mNextKeyID value // TODO maybe remove FreeRendezvousSession() since mNextKeyID is always persisted immediately PersistNextKeyId(); @@ -811,15 +914,15 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam if (err != CHIP_NO_ERROR) { // Delete the current rendezvous session only if a device is not currently being paired. - if (mDeviceBeingPaired == kNumMaxActiveDevices) + if (mDeviceBeingCommissioned == nullptr) { FreeRendezvousSession(); } if (device != nullptr) { - ReleaseDevice(device); - mDeviceBeingPaired = kNumMaxActiveDevices; + ReleaseCommissioneeDevice(device); + mDeviceBeingCommissioned = nullptr; } } @@ -829,104 +932,19 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam CHIP_ERROR DeviceCommissioner::StopPairing(NodeId remoteDeviceId) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mDeviceBeingPaired < kNumMaxActiveDevices, CHIP_ERROR_INCORRECT_STATE); - Device * device = &mActiveDevices[mDeviceBeingPaired]; - VerifyOrReturnError(device->GetDeviceId() == remoteDeviceId, CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR); + CommissioneeDeviceProxy * device = FindCommissioneeDevice(remoteDeviceId); + VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR); FreeRendezvousSession(); - ReleaseDevice(device); - mDeviceBeingPaired = kNumMaxActiveDevices; + ReleaseCommissioneeDevice(device); return CHIP_NO_ERROR; } CHIP_ERROR DeviceCommissioner::UnpairDevice(NodeId remoteDeviceId) { // TODO: Send unpairing message to the remote device. - - VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - - if (mDeviceBeingPaired < kNumMaxActiveDevices) - { - Device * device = &mActiveDevices[mDeviceBeingPaired]; - if (device->GetDeviceId() == remoteDeviceId) - { - FreeRendezvousSession(); - } - } - - if (mStorageDelegate != nullptr) - { - PERSISTENT_KEY_OP(remoteDeviceId, kPairedDeviceKeyPrefix, key, mStorageDelegate->SyncDeleteKeyValue(key)); - } - - mPairedDevices.Remove(remoteDeviceId); - mPairedDevicesUpdated = true; - ReleaseDeviceById(remoteDeviceId); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DeviceCommissioner::OperationalDiscoveryComplete(NodeId remoteDeviceId) -{ - ChipLogProgress(Controller, "OperationalDiscoveryComplete for device ID %" PRIu64, remoteDeviceId); - VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - - Device * device = nullptr; - ReturnErrorOnFailure(GetDevice(remoteDeviceId, &device)); - device->OperationalCertProvisioned(); - PersistDevice(device); - PersistNextKeyId(); - - return GetConnectedDevice(remoteDeviceId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); -} - -CHIP_ERROR DeviceCommissioner::OpenCommissioningWindowWithCallback(NodeId deviceId, uint16_t timeout, uint16_t iteration, - uint16_t discriminator, uint8_t option, - Callback::Callback * callback) -{ - ChipLogProgress(Controller, "OpenCommissioningWindow for device ID %" PRIu64, deviceId); - VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - - Device * device = nullptr; - ReturnErrorOnFailure(GetDevice(deviceId, &device)); - - std::string QRCode; - std::string manualPairingCode; - SetupPayload payload; - Device::CommissioningWindowOption commissioningWindowOption; - ByteSpan salt(reinterpret_cast(kSpake2pKeyExchangeSalt), strlen(kSpake2pKeyExchangeSalt)); - - payload.discriminator = discriminator; - - switch (option) - { - case 0: - commissioningWindowOption = Device::CommissioningWindowOption::kOriginalSetupCode; - break; - case 1: - commissioningWindowOption = Device::CommissioningWindowOption::kTokenWithRandomPIN; - break; - case 2: - commissioningWindowOption = Device::CommissioningWindowOption::kTokenWithProvidedPIN; - break; - default: - ChipLogError(Controller, "Invalid Pairing Window option"); - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ReturnErrorOnFailure(device->OpenCommissioningWindow(timeout, iteration, commissioningWindowOption, salt, callback, payload)); - - if (commissioningWindowOption != Device::CommissioningWindowOption::kOriginalSetupCode) - { - ReturnErrorOnFailure(ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(manualPairingCode)); - ChipLogProgress(Controller, "Manual pairing code: [%s]", manualPairingCode.c_str()); - - ReturnErrorOnFailure(QRCodeSetupPayloadGenerator(payload).payloadBase38Representation(QRCode)); - ChipLogProgress(Controller, "SetupQRCode: [%s]", QRCode.c_str()); - } - return CHIP_NO_ERROR; } @@ -939,19 +957,17 @@ void DeviceCommissioner::RendezvousCleanup(CHIP_ERROR status) { FreeRendezvousSession(); - // TODO: make mStorageDelegate mandatory once all controller applications implement the interface. - if (mDeviceBeingPaired != kNumMaxActiveDevices && mStorageDelegate != nullptr) + if (mDeviceBeingCommissioned != nullptr) { // Let's release the device that's being paired. // If pairing was successful, its information is // already persisted. The application will use GetDevice() // method to get access to the device, which will fetch // the device information from the persistent storage. - DeviceController::ReleaseDevice(mDeviceBeingPaired); + ReleaseCommissioneeDevice(mDeviceBeingCommissioned); + mDeviceBeingCommissioned = nullptr; } - mDeviceBeingPaired = kNumMaxActiveDevices; - if (mPairingDelegate != nullptr) { mPairingDelegate->OnPairingComplete(status); @@ -972,16 +988,16 @@ void DeviceCommissioner::OnSessionEstablishmentError(CHIP_ERROR err) void DeviceCommissioner::OnSessionEstablished() { - VerifyOrReturn(mDeviceBeingPaired < kNumMaxActiveDevices, OnSessionEstablishmentError(CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR)); + VerifyOrReturn(mDeviceBeingCommissioned != nullptr, OnSessionEstablishmentError(CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR)); - Device * device = &mActiveDevices[mDeviceBeingPaired]; + PASESession * pairing = &mDeviceBeingCommissioned->GetPairing(); // TODO: the session should know which peer we are trying to connect to when started - mPairingSession.SetPeerNodeId(device->GetDeviceId()); + pairing->SetPeerNodeId(mDeviceBeingCommissioned->GetDeviceId()); - CHIP_ERROR err = mSystemState->SessionMgr()->NewPairing( - Optional::Value(mPairingSession.GetPeerAddress()), mPairingSession.GetPeerNodeId(), - &mPairingSession, CryptoContext::SessionRole::kInitiator, mFabricIndex); + CHIP_ERROR err = mSystemState->SessionMgr()->NewPairing(Optional::Value(pairing->GetPeerAddress()), + pairing->GetPeerNodeId(), pairing, + CryptoContext::SessionRole::kInitiator, mFabricIndex); if (err != CHIP_NO_ERROR) { ChipLogError(Controller, "Failed in setting up secure channel: err %s", ErrorStr(err)); @@ -1001,7 +1017,7 @@ void DeviceCommissioner::OnSessionEstablished() if (usingLegacyFlowWithImmediateStart) { - err = SendCertificateChainRequestCommand(device, CertificateType::kPAI); + err = SendCertificateChainRequestCommand(mDeviceBeingCommissioned, CertificateType::kPAI); if (err != CHIP_NO_ERROR) { ChipLogError(Ble, "Failed in sending 'Certificate Chain request' command to the device: err %s", ErrorStr(err)); @@ -1015,7 +1031,8 @@ void DeviceCommissioner::OnSessionEstablished() } } -CHIP_ERROR DeviceCommissioner::SendCertificateChainRequestCommand(Device * device, Credentials::CertificateType certificateType) +CHIP_ERROR DeviceCommissioner::SendCertificateChainRequestCommand(CommissioneeDeviceProxy * device, + Credentials::CertificateType certificateType) { ChipLogDetail(Controller, "Sending Certificate Chain request to %p device", device); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -1062,9 +1079,9 @@ void DeviceCommissioner::OnCertificateChainResponse(void * context, ByteSpan cer CHIP_ERROR DeviceCommissioner::ProcessCertificateChain(const ByteSpan & certificate) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mDeviceBeingPaired < kNumMaxActiveDevices, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDeviceBeingCommissioned != nullptr, CHIP_ERROR_INCORRECT_STATE); - Device * device = &mActiveDevices[mDeviceBeingPaired]; + CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; // PAI is being requested first - If PAI is not present, DAC will be requested next anyway. switch (mCertificateTypeBeingRequested) @@ -1102,7 +1119,7 @@ CHIP_ERROR DeviceCommissioner::ProcessCertificateChain(const ByteSpan & certific return CHIP_NO_ERROR; } -CHIP_ERROR DeviceCommissioner::SendAttestationRequestCommand(Device * device, const ByteSpan & attestationNonce) +CHIP_ERROR DeviceCommissioner::SendAttestationRequestCommand(CommissioneeDeviceProxy * device, const ByteSpan & attestationNonce) { ChipLogDetail(Controller, "Sending Attestation request to %p device", device); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -1141,16 +1158,18 @@ void DeviceCommissioner::OnAttestationResponse(void * context, chip::ByteSpan at CHIP_ERROR DeviceCommissioner::ValidateAttestationInfo(const ByteSpan & attestationElements, const ByteSpan & signature) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mDeviceBeingPaired < kNumMaxActiveDevices, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDeviceBeingCommissioned != nullptr, CHIP_ERROR_INCORRECT_STATE); - Device * device = &mActiveDevices[mDeviceBeingPaired]; + CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; DeviceAttestationVerifier * dac_verifier = GetDeviceAttestationVerifier(); + PASESession * pairing = &mDeviceBeingCommissioned->GetPairing(); + // Retrieve attestation challenge ByteSpan attestationChallenge = mSystemState->SessionMgr() - ->GetSecureSession({ mPairingSession.GetPeerNodeId(), mPairingSession.GetLocalSessionId(), - mPairingSession.GetPeerSessionId(), mFabricIndex }) + ->GetSecureSession({ pairing->GetPeerNodeId(), pairing->GetLocalSessionId(), + pairing->GetPeerSessionId(), mFabricIndex }) ->GetCryptoContext() .GetAttestationChallenge(); @@ -1195,9 +1214,9 @@ void DeviceCommissioner::HandleAttestationResult(CHIP_ERROR err) } VerifyOrReturn(mState == State::Initialized); - VerifyOrReturn(mDeviceBeingPaired < kNumMaxActiveDevices); + VerifyOrReturn(mDeviceBeingCommissioned != nullptr); - Device * device = &mActiveDevices[mDeviceBeingPaired]; + CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; ChipLogProgress(Controller, "Sending 'CSR request' command to the device."); CHIP_ERROR error = SendOperationalCertificateSigningRequestCommand(device); @@ -1209,7 +1228,7 @@ void DeviceCommissioner::HandleAttestationResult(CHIP_ERROR err) } } -CHIP_ERROR DeviceCommissioner::SendOperationalCertificateSigningRequestCommand(Device * device) +CHIP_ERROR DeviceCommissioner::SendOperationalCertificateSigningRequestCommand(CommissioneeDeviceProxy * device) { ChipLogDetail(Controller, "Sending OpCSR request to %p device", device); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -1261,16 +1280,16 @@ void DeviceCommissioner::OnDeviceNOCChainGeneration(void * context, CHIP_ERROR s DeviceCommissioner * commissioner = static_cast(context); ChipLogProgress(Controller, "Received callback from the CA for NOC Chain generation. Status %s", ErrorStr(status)); - Device * device = nullptr; + CommissioneeDeviceProxy * device = nullptr; VerifyOrExit(commissioner->mState == State::Initialized, err = CHIP_ERROR_INCORRECT_STATE); - VerifyOrExit(commissioner->mDeviceBeingPaired < kNumMaxActiveDevices, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(commissioner->mDeviceBeingCommissioned != nullptr, err = CHIP_ERROR_INCORRECT_STATE); // Check if the callback returned a failure VerifyOrExit(status == CHIP_NO_ERROR, err = status); // TODO - Verify that the generated root cert matches with commissioner's root cert - device = &commissioner->mActiveDevices[commissioner->mDeviceBeingPaired]; + device = commissioner->mDeviceBeingCommissioned; { // Reuse NOC Cert buffer for temporary store Root Cert. @@ -1315,9 +1334,9 @@ void DeviceCommissioner::OnDeviceNOCChainGeneration(void * context, CHIP_ERROR s CHIP_ERROR DeviceCommissioner::ProcessOpCSR(const ByteSpan & NOCSRElements, const ByteSpan & AttestationSignature) { VerifyOrReturnError(mState == State::Initialized, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturnError(mDeviceBeingPaired < kNumMaxActiveDevices, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDeviceBeingCommissioned != nullptr, CHIP_ERROR_INCORRECT_STATE); - Device * device = &mActiveDevices[mDeviceBeingPaired]; + CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; ChipLogProgress(Controller, "Getting certificate chain for the device from the issuer"); @@ -1328,7 +1347,8 @@ CHIP_ERROR DeviceCommissioner::ProcessOpCSR(const ByteSpan & NOCSRElements, cons ByteSpan(), &mDeviceNOCChainCallback); } -CHIP_ERROR DeviceCommissioner::SendOperationalCertificate(Device * device, const ByteSpan & nocCertBuf, const ByteSpan & icaCertBuf) +CHIP_ERROR DeviceCommissioner::SendOperationalCertificate(CommissioneeDeviceProxy * device, const ByteSpan & nocCertBuf, + const ByteSpan & icaCertBuf) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); chip::Controller::OperationalCredentialsCluster cluster; @@ -1388,20 +1408,20 @@ void DeviceCommissioner::OnOperationalCertificateAddResponse(void * context, uin ChipLogProgress(Controller, "Device returned status %d on receiving the NOC", StatusCode); DeviceCommissioner * commissioner = static_cast(context); - CHIP_ERROR err = CHIP_NO_ERROR; - Device * device = nullptr; + CHIP_ERROR err = CHIP_NO_ERROR; + CommissioneeDeviceProxy * device = nullptr; VerifyOrExit(commissioner->mState == State::Initialized, err = CHIP_ERROR_INCORRECT_STATE); commissioner->mOpCSRResponseCallback.Cancel(); commissioner->mOnCertFailureCallback.Cancel(); - VerifyOrExit(commissioner->mDeviceBeingPaired < kNumMaxActiveDevices, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(commissioner->mDeviceBeingCommissioned != nullptr, err = CHIP_ERROR_INCORRECT_STATE); err = ConvertFromNodeOperationalCertStatus(StatusCode); SuccessOrExit(err); - device = &commissioner->mActiveDevices[commissioner->mDeviceBeingPaired]; + device = commissioner->mDeviceBeingCommissioned; err = commissioner->OnOperationalCredentialsProvisioningCompletion(device); @@ -1413,7 +1433,7 @@ void DeviceCommissioner::OnOperationalCertificateAddResponse(void * context, uin } } -CHIP_ERROR DeviceCommissioner::SendTrustedRootCertificate(Device * device, const ByteSpan & rcac) +CHIP_ERROR DeviceCommissioner::SendTrustedRootCertificate(CommissioneeDeviceProxy * device, const ByteSpan & rcac) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -1437,17 +1457,17 @@ void DeviceCommissioner::OnRootCertSuccessResponse(void * context) ChipLogProgress(Controller, "Device confirmed that it has received the root certificate"); DeviceCommissioner * commissioner = static_cast(context); - CHIP_ERROR err = CHIP_NO_ERROR; - Device * device = nullptr; + CHIP_ERROR err = CHIP_NO_ERROR; + CommissioneeDeviceProxy * device = nullptr; VerifyOrExit(commissioner->mState == State::Initialized, err = CHIP_ERROR_INCORRECT_STATE); commissioner->mRootCertResponseCallback.Cancel(); commissioner->mOnRootCertFailureCallback.Cancel(); - VerifyOrExit(commissioner->mDeviceBeingPaired < kNumMaxActiveDevices, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(commissioner->mDeviceBeingCommissioned != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - device = &commissioner->mActiveDevices[commissioner->mDeviceBeingPaired]; + device = commissioner->mDeviceBeingCommissioned; ChipLogProgress(Controller, "Sending operational certificate chain to the device"); err = commissioner->SendOperationalCertificate(device, device->GetNOCCert(), device->GetICACert()); @@ -1470,7 +1490,7 @@ void DeviceCommissioner::OnRootCertFailureResponse(void * context, uint8_t statu commissioner->OnSessionEstablishmentError(CHIP_ERROR_INTERNAL); } -CHIP_ERROR DeviceCommissioner::OnOperationalCredentialsProvisioningCompletion(Device * device) +CHIP_ERROR DeviceCommissioner::OnOperationalCredentialsProvisioningCompletion(CommissioneeDeviceProxy * device) { ChipLogProgress(Controller, "Operational credentials provisioned on device %p", device); VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -1483,18 +1503,11 @@ CHIP_ERROR DeviceCommissioner::OnOperationalCredentialsProvisioningCompletion(De else #endif { - mPairingSession.ToSerializable(device->GetPairing()); mSystemState->SystemLayer()->CancelTimer(OnSessionEstablishmentTimeoutCallback, this); mPairedDevices.Insert(device->GetDeviceId()); mPairedDevicesUpdated = true; - // Note - This assumes storage is synchronous, the device must be in storage before we can cleanup - // the rendezvous session and mark pairing success - PersistDevice(device); - // Also persist the device list at this time - // This makes sure that a newly added device is immediately available - PersistDeviceList(); if (mPairingDelegate != nullptr) { mPairingDelegate->OnStatusUpdate(DevicePairingDelegate::SecurePairingSuccess); @@ -1505,26 +1518,6 @@ CHIP_ERROR DeviceCommissioner::OnOperationalCredentialsProvisioningCompletion(De return CHIP_NO_ERROR; } -void DeviceCommissioner::PersistDeviceList() -{ - if (mStorageDelegate != nullptr && mPairedDevicesUpdated && mState == State::Initialized) - { - mPairedDevices.Serialize([&](ByteSpan data) -> CHIP_ERROR { - VerifyOrReturnError(data.size() <= UINT16_MAX, CHIP_ERROR_INVALID_ARGUMENT); - PERSISTENT_KEY_OP(static_cast(0), kPairedDeviceListKeyPrefix, key, - mStorageDelegate->SyncSetKeyValue(key, data.data(), static_cast(data.size()))); - mPairedDevicesUpdated = false; - return CHIP_NO_ERROR; - }); - } -} - -void DeviceCommissioner::ReleaseDevice(Device * device) -{ - PersistDeviceList(); - DeviceController::ReleaseDevice(device); -} - #if CONFIG_NETWORK_LAYER_BLE CHIP_ERROR DeviceCommissioner::CloseBleConnection() { @@ -1538,9 +1531,9 @@ CHIP_ERROR DeviceCommissioner::CloseBleConnection() void DeviceCommissioner::OnSessionEstablishmentTimeout() { VerifyOrReturn(mState == State::Initialized); - VerifyOrReturn(mDeviceBeingPaired < kNumMaxActiveDevices); + VerifyOrReturn(mDeviceBeingCommissioned != nullptr); - Device * device = &mActiveDevices[mDeviceBeingPaired]; + CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; StopPairing(device->GetDeviceId()); if (mPairingDelegate != nullptr) @@ -1611,82 +1604,6 @@ void DeviceCommissioner::OnNodeDiscoveryComplete(const chip::Dnssd::DiscoveredNo #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY -void DeviceControllerInteractionModelDelegate::OnResponse(app::CommandSender * apCommandSender, - const app::ConcreteCommandPath & aPath, - const chip::app::StatusIB & aStatus, TLV::TLVReader * aData) -{ - // Generally IM has more detailed errors than ember library, here we always use the, the actual handling of the - // commands should implement full IMDelegate. - // #6308 By implement app side IM delegate, we should be able to accept detailed error codes. - // Note: The IMDefaultResponseCallback is a bridge to the old CallbackMgr before IM is landed, so it still accepts EmberAfStatus - // instead of IM status code. - if (aData != nullptr) - { - chip::app::DispatchSingleClusterResponseCommand(aPath, *aData, apCommandSender); - } - else - { - IMDefaultResponseCallback(apCommandSender, EMBER_ZCL_STATUS_SUCCESS); - } -} - -void DeviceControllerInteractionModelDelegate::OnError(const app::CommandSender * apCommandSender, - const chip::app::StatusIB & aStatus, CHIP_ERROR aError) -{ - // The IMDefaultResponseCallback started out life as an Ember function, so it only accepted - // Ember status codes. Consequently, let's convert the IM code over to a meaningful Ember status before dispatching. - // - // This however, results in loss (aError is completely discarded). When full cluster-specific status codes are implemented as - // well, this will be an even bigger problem. - // - // For now, #10331 tracks this issue. - IMDefaultResponseCallback(apCommandSender, app::ToEmberAfStatus(aStatus.mStatus)); -} - -void DeviceControllerInteractionModelDelegate::OnDone(app::CommandSender * apCommandSender) -{ - return chip::Platform::Delete(apCommandSender); -} - -void DeviceControllerInteractionModelDelegate::OnAttributeData(const app::ReadClient * apReadClient, - const app::ConcreteAttributePath & aPath, TLV::TLVReader * apData, - const app::StatusIB & aStatus) -{ - IMReadReportAttributesResponseCallback(apReadClient, &aPath, apData, aStatus.mStatus); -} - -void DeviceControllerInteractionModelDelegate::OnSubscriptionEstablished(const app::ReadClient * apReadClient) -{ - IMSubscribeResponseCallback(apReadClient, EMBER_ZCL_STATUS_SUCCESS); -} - -void DeviceControllerInteractionModelDelegate::OnError(const app::ReadClient * apReadClient, CHIP_ERROR aError) -{ - app::ClusterInfo path; - path.mNodeId = apReadClient->GetPeerNodeId(); - IMReadReportAttributesResponseCallback(apReadClient, nullptr, nullptr, Protocols::InteractionModel::Status::Failure); -} - -void DeviceControllerInteractionModelDelegate::OnDone(app::ReadClient * apReadClient) -{ - if (apReadClient->IsSubscriptionType()) - { - this->FreeAttributePathParam(reinterpret_cast(apReadClient)); - } -} - -void DeviceControllerInteractionModelDelegate::OnResponse(const app::WriteClient * apWriteClient, - const app::ConcreteAttributePath & aPath, app::StatusIB attributeStatus) -{ - IMWriteResponseCallback(apWriteClient, attributeStatus.mStatus); -} -void DeviceControllerInteractionModelDelegate::OnError(const app::WriteClient * apWriteClient, CHIP_ERROR aError) -{ - IMWriteResponseCallback(apWriteClient, Protocols::InteractionModel::Status::Failure); -} - -void DeviceControllerInteractionModelDelegate::OnDone(app::WriteClient * apWriteClient) {} - void BasicSuccess(void * context, uint16_t val) { ChipLogProgress(Controller, "Received success response 0x%x\n", val); @@ -1704,15 +1621,21 @@ void BasicFailure(void * context, uint8_t status) #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD void DeviceCommissioner::OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & nodeData) { + ChipLogProgress(Controller, "OperationalDiscoveryComplete for device ID 0x" ChipLogFormatX64, + ChipLogValueX64(nodeData.mPeerId.GetNodeId())); + VerifyOrReturn(mState == State::Initialized); + + GetOperationalDeviceWithAddress(nodeData.mPeerId.GetNodeId(), ToPeerAddress(nodeData), &mOnDeviceConnectedCallback, + &mOnDeviceConnectionFailureCallback); + DeviceController::OnNodeIdResolved(nodeData); - OperationalDiscoveryComplete(nodeData.mPeerId.GetNodeId()); } void DeviceCommissioner::OnNodeIdResolutionFailed(const chip::PeerId & peer, CHIP_ERROR error) { - if (mDeviceBeingPaired < kNumMaxActiveDevices) + if (mDeviceBeingCommissioned != nullptr) { - Device * device = &mActiveDevices[mDeviceBeingPaired]; + CommissioneeDeviceProxy * device = mDeviceBeingCommissioned; if (device->GetDeviceId() == peer.GetNodeId() && mCommissioningStage == CommissioningStage::kFindOperational) { OnSessionEstablishmentError(error); @@ -1723,15 +1646,15 @@ void DeviceCommissioner::OnNodeIdResolutionFailed(const chip::PeerId & peer, CHI #endif -void DeviceCommissioner::OnDeviceConnectedFn(void * context, Device * device) +void DeviceCommissioner::OnDeviceConnectedFn(void * context, DeviceProxy * device) { DeviceCommissioner * commissioner = static_cast(context); VerifyOrReturn(commissioner != nullptr, ChipLogProgress(Controller, "Device connected callback with null context. Ignoring")); - if (commissioner->mDeviceBeingPaired < kNumMaxActiveDevices) + if (commissioner->mDeviceBeingCommissioned != nullptr) { - Device * deviceBeingPaired = &commissioner->mActiveDevices[commissioner->mDeviceBeingPaired]; - if (device == deviceBeingPaired && commissioner->mIsIPRendezvous) + CommissioneeDeviceProxy * deviceBeingPaired = commissioner->mDeviceBeingCommissioned; + if (device->GetDeviceId() == deviceBeingPaired->GetDeviceId() && commissioner->mIsIPRendezvous) { if (commissioner->mCommissioningStage == CommissioningStage::kFindOperational) { @@ -1813,13 +1736,13 @@ void DeviceCommissioner::AdvanceCommissioningStage(CHIP_ERROR err) { return; } - Device * device = nullptr; - if (mDeviceBeingPaired >= kNumMaxActiveDevices) + CommissioneeDeviceProxy * device = nullptr; + if (mDeviceBeingCommissioned == nullptr) { return; } - device = &mActiveDevices[mDeviceBeingPaired]; + device = mDeviceBeingCommissioned; // TODO(cecille): We probably want something better than this for breadcrumbs. uint64_t breadcrumb = static_cast(nextStage); @@ -1940,18 +1863,11 @@ void DeviceCommissioner::AdvanceCommissioningStage(CHIP_ERROR err) break; case CommissioningStage::kCleanup: ChipLogProgress(Controller, "Rendezvous cleanup"); - mPairingSession.ToSerializable(device->GetPairing()); mSystemState->SystemLayer()->CancelTimer(OnSessionEstablishmentTimeoutCallback, this); mPairedDevices.Insert(device->GetDeviceId()); mPairedDevicesUpdated = true; - // Note - This assumes storage is synchronous, the device must be in storage before we can cleanup - // the rendezvous session and mark pairing success - PersistDevice(device); - // Also persist the device list at this time - // This makes sure that a newly added device is immediately available - PersistDeviceList(); if (mPairingDelegate != nullptr) { mPairingDelegate->OnStatusUpdate(DevicePairingDelegate::SecurePairingSuccess); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 444729cffe75d7..6f684e7b76cebc 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -28,12 +28,13 @@ #pragma once +#include #include +#include #include #include -#include #include -#include +#include #include #include #include @@ -42,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -54,6 +56,8 @@ #include #include +#include + #if CONFIG_DEVICE_LAYER #include #endif @@ -172,6 +176,8 @@ struct CommissionerInitParams : public ControllerInitParams DevicePairingDelegate * pairingDelegate = nullptr; }; +typedef void (*OnOpenCommissioningWindow)(void * context, NodeId deviceId, CHIP_ERROR status, SetupPayload payload); + /** * @brief * Controller applications can use this class to communicate with already paired CHIP devices. The @@ -191,6 +197,13 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, DeviceController(); virtual ~DeviceController() {} + enum class CommissioningWindowOption + { + kOriginalSetupCode = 0, + kTokenWithRandomPIN, + kTokenWithProvidedPIN, + }; + CHIP_ERROR Init(ControllerInitParams params); /** @@ -204,17 +217,16 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, */ virtual CHIP_ERROR Shutdown(); - /** - * @brief - * This function is similar to the other GetDevice object, except it reads the serialized object from - * the persistent storage. - * - * @param[in] deviceId Node ID for the CHIP device - * @param[out] device The output device object - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - CHIP_ERROR GetDevice(NodeId deviceId, Device ** device); + CHIP_ERROR GetOperationalDevice(NodeId deviceId, Callback::Callback * onConnection, + Callback::Callback * onFailure) + { + return GetOperationalDeviceWithAddress(deviceId, Transport::PeerAddress::UDP(Inet::IPAddress::Any), onConnection, + onFailure); + } + + CHIP_ERROR GetOperationalDeviceWithAddress(NodeId deviceId, const Transport::PeerAddress & addr, + Callback::Callback * onConnection, + Callback::Callback * onFailure); CHIP_ERROR GetPeerAddressAndPort(PeerId peerId, Inet::IPAddress & addr, uint16_t & port); @@ -229,13 +241,16 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, * Once the connection is successfully establishes (or if it's already connected), it calls `onConnectedDevice` * callback. If it fails to establish the connection, it calls `onError` callback. */ - CHIP_ERROR GetConnectedDevice(NodeId deviceId, Callback::Callback * onConnection, - Callback::Callback * onFailure); + virtual CHIP_ERROR GetConnectedDevice(NodeId deviceId, Callback::Callback * onConnection, + Callback::Callback * onFailure) + { + return GetOperationalDeviceWithAddress(deviceId, Transport::PeerAddress::UDP(Inet::IPAddress::Any), onConnection, + onFailure); + } /** * @brief - * This function update the device informations asynchronously using mdns. - * If new device informations has been found, it will be persisted. + * This function update the device informations asynchronously using dnssd. * * @param[in] deviceId Node ID for the CHIP device * @@ -243,11 +258,69 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, */ CHIP_ERROR UpdateDevice(NodeId deviceId); - void PersistDevice(Device * device); + /** + * @brief + * Compute a PASE verifier and passcode ID for the desired setup pincode. + * + * This can be used to open a commissioning window on the device for + * additional administrator commissioning. + * + * @param[in] iterations The number of iterations to use when generating the verifier + * @param[in] setupPincode The desired PIN code to use + * @param[in] salt The 16-byte salt for verifier computation + * @param[out] outVerifier The PASEVerifier to be populated on success + * @param[out] outPasscodeId The passcode ID to be populated on success + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error + */ + CHIP_ERROR ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt, PASEVerifier & outVerifier, + uint32_t & outPasscodeId); - virtual void ReleaseDevice(Device * device); + /** + * @brief + * Trigger a paired device to re-enter the commissioning mode. The device will exit the commissioning mode + * after a successful commissioning, or after the given `timeout` time. + * + * @param[in] deviceId The device Id. + * @param[in] timeout The commissioning mode should terminate after this much time. + * @param[in] iteration The PAKE iteration count associated with the PAKE Passcode ID and ephemeral + * PAKE passcode verifier to be used for this commissioning. + * @param[in] discriminator The long discriminator for the DNS-SD advertisement. + * @param[in] option The commissioning window can be opened using the original setup code, or an + * onboarding token can be generated using a random setup PIN code (or with + * the PIN code provied in the setupPayload). + * @param[out] payload The generated setup payload. + * - The payload is generated only if the user didn't ask for using the original setup code. + * - If the user asked to use the provided setup PIN, the PIN must be provided as part of + * this payload + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error + */ + CHIP_ERROR OpenCommissioningWindow(NodeId deviceId, uint16_t timeout, uint16_t iteration, uint16_t discriminator, + uint8_t option, SetupPayload & payload) + { + return OpenCommissioningWindowWithCallback(deviceId, timeout, iteration, discriminator, option, nullptr); + } - void ReleaseDeviceById(NodeId remoteDeviceId); + /** + * @brief + * Trigger a paired device to re-enter the commissioning mode. The device will exit the commissioning mode + * after a successful commissioning, or after the given `timeout` time. + * + * @param[in] deviceId The device Id. + * @param[in] timeout The commissioning mode should terminate after this much time. + * @param[in] iteration The PAKE iteration count associated with the PAKE Passcode ID and ephemeral + * PAKE passcode verifier to be used for this commissioning. + * @param[in] discriminator The long discriminator for the DNS-SD advertisement. + * @param[in] option The commissioning window can be opened using the original setup code, or an + * onboarding token can be generated using a random setup PIN code (or with + * the PIN code provied in the setupPayload). + * @param[in] callback The function to be called on success or failure of opening of commissioning window. + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error + */ + CHIP_ERROR OpenCommissioningWindowWithCallback(NodeId deviceId, uint16_t timeout, uint16_t iteration, uint16_t discriminator, + uint8_t option, Callback::Callback * callback); #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD void RegisterDeviceAddressUpdateDelegate(DeviceAddressUpdateDelegate * delegate) { mDeviceAddressUpdateDelegate = delegate; } @@ -273,6 +346,8 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, return nullptr; } + void ReleaseOperationalDevice(NodeId remoteDeviceId); + protected: enum class State { @@ -282,11 +357,7 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, State mState; - /* A list of device objects that can be used for communicating with corresponding - CHIP devices. The list does not contain all the paired devices, but only the ones - which the controller application is currently accessing. - */ - Device mActiveDevices[kNumMaxActiveDevices]; + BitMapObjectPool mOperationalDevices; SerializableU64Set mPairedDevices; bool mPairedDevicesInitialized; @@ -296,6 +367,8 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, PersistentStorageDelegate * mStorageDelegate = nullptr; #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD + Transport::PeerAddress ToPeerAddress(const chip::Dnssd::ResolvedNodeData & nodeData) const; + DeviceAddressUpdateDelegate * mDeviceAddressUpdateDelegate = nullptr; // TODO(cecille): Make this configuarable. static constexpr int kMaxCommissionableNodes = 10; @@ -303,10 +376,6 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, #endif DeviceControllerSystemState * mSystemState = nullptr; - uint16_t GetInactiveDeviceIndex(); - uint16_t FindDeviceIndex(SessionHandle session); - uint16_t FindDeviceIndex(NodeId id); - void ReleaseDevice(uint16_t index); CHIP_ERROR InitializePairedDeviceList(); CHIP_ERROR SetPairedDeviceList(ByteSpan pairedDeviceSerializedSet); ControllerDeviceInitParams GetControllerDeviceInitParams(); @@ -321,6 +390,10 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, uint16_t mVendorId; + //////////// ExchangeMgrDelegate Implementation /////////////// + void OnNewConnection(SessionHandle session, Messaging::ExchangeManager * mgr) override; + void OnConnectionExpired(SessionHandle session, Messaging::ExchangeManager * mgr) override; + #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD //////////// ResolverDelegate Implementation /////////////// void OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & nodeData) override; @@ -334,13 +407,25 @@ class DLL_EXPORT DeviceController : public Messaging::ExchangeDelegate, System::PacketBufferHandle && msgBuf) override; void OnResponseTimeout(Messaging::ExchangeContext * ec) override; - //////////// ExchangeMgrDelegate Implementation /////////////// - void OnNewConnection(SessionHandle session, Messaging::ExchangeManager * mgr) override; - void OnConnectionExpired(SessionHandle session, Messaging::ExchangeManager * mgr) override; + OperationalDeviceProxy * FindOperationalDevice(SessionHandle session); + OperationalDeviceProxy * FindOperationalDevice(NodeId id); + void ReleaseOperationalDevice(OperationalDeviceProxy * device); void ReleaseAllDevices(); + Callback::Callback mOpenPairingSuccessCallback; + Callback::Callback mOpenPairingFailureCallback; + + // TODO - Support opening commissioning window simultaneously on multiple devices + Callback::Callback * mCommissioningWindowCallback = nullptr; + SetupPayload mSetupPayload; + NodeId mDeviceWithCommissioningWindowOpen; + + static void OnOpenPairingWindowSuccessResponse(void * context); + static void OnOpenPairingWindowFailureResponse(void * context, uint8_t status); + CHIP_ERROR ProcessControllerNOCChain(const ControllerInitParams & params); + uint16_t mPAKEVerifierID = 1; }; /** @@ -412,6 +497,11 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, */ CHIP_ERROR PairDevice(NodeId remoteDeviceId, RendezvousParameters & params); + CHIP_ERROR GetDeviceBeingCommissioned(NodeId deviceId, CommissioneeDeviceProxy ** device); + + CHIP_ERROR GetConnectedDevice(NodeId deviceId, Callback::Callback * onConnection, + Callback::Callback * onFailure) override; + /** * @brief * This function stops a pairing process that's in progress. It does not delete the pairing of a previously @@ -433,66 +523,12 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, */ CHIP_ERROR UnpairDevice(NodeId remoteDeviceId); - /** - * This function call indicates that the device has been provisioned with operational - * credentials, and is reachable on operational network. At this point, the device is - * available for CASE session establishment. - * - * The function updates the state of device proxy object such that all subsequent messages - * will use secure session established via CASE handshake. - */ - CHIP_ERROR OperationalDiscoveryComplete(NodeId remoteDeviceId); - - /** - * @brief - * Trigger a paired device to re-enter the commissioning mode. The device will exit the commissioning mode - * after a successful commissioning, or after the given `timeout` time. - * - * @param[in] deviceId The device Id. - * @param[in] timeout The commissioning mode should terminate after this much time. - * @param[in] iteration The PAKE iteration count associated with the PAKE Passcode ID and ephemeral - * PAKE passcode verifier to be used for this commissioning. - * @param[in] discriminator The long discriminator for the DNS-SD advertisement. - * @param[in] option The commissioning window can be opened using the original setup code, or an - * onboarding token can be generated using a random setup PIN code (or with - * the PIN code provied in the setupPayload). - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error - */ - CHIP_ERROR OpenCommissioningWindow(NodeId deviceId, uint16_t timeout, uint16_t iteration, uint16_t discriminator, - uint8_t option) - { - return OpenCommissioningWindowWithCallback(deviceId, timeout, iteration, discriminator, option, nullptr); - } - - /** - * @brief - * Trigger a paired device to re-enter the commissioning mode. The device will exit the commissioning mode - * after a successful commissioning, or after the given `timeout` time. - * - * @param[in] deviceId The device Id. - * @param[in] timeout The commissioning mode should terminate after this much time. - * @param[in] iteration The PAKE iteration count associated with the PAKE Passcode ID and ephemeral - * PAKE passcode verifier to be used for this commissioning. - * @param[in] discriminator The long discriminator for the DNS-SD advertisement. - * @param[in] option The commissioning window can be opened using the original setup code, or an - * onboarding token can be generated using a random setup PIN code (or with - * the PIN code provied in the setupPayload). - * @param[in] callback The function to be called on success or failure of opening of commissioning window. - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error - */ - CHIP_ERROR OpenCommissioningWindowWithCallback(NodeId deviceId, uint16_t timeout, uint16_t iteration, uint16_t discriminator, - uint8_t option, Callback::Callback * callback); - //////////// SessionEstablishmentDelegate Implementation /////////////// void OnSessionEstablishmentError(CHIP_ERROR error) override; void OnSessionEstablished() override; void RendezvousCleanup(CHIP_ERROR status); - void ReleaseDevice(Device * device) override; - void AdvanceCommissioningStage(CHIP_ERROR err); #if CONFIG_NETWORK_LAYER_BLE @@ -578,10 +614,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, private: DevicePairingDelegate * mPairingDelegate; - /* This field is an index in mActiveDevices list. The object at this index in the list - contains the device object that's tracking the state of the device that's being paired. - If no device is currently being paired, this value will be kNumMaxPairedDevices. */ - uint16_t mDeviceBeingPaired; + CommissioneeDeviceProxy * mDeviceBeingCommissioned = nullptr; Credentials::CertificateType mCertificateTypeBeingRequested = Credentials::CertificateType::kUnknown; @@ -598,6 +631,8 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, CommissioningStage mCommissioningStage = CommissioningStage::kSecurePairing; + BitMapObjectPool mCommissioneeDevicePool; + #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable UserDirectedCommissioningServer * mUdcServer = nullptr; // mUdcTransportMgr is for insecure communication (ex. user directed commissioning) @@ -605,42 +640,45 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, uint16_t mUdcListenPort = CHIP_UDC_PORT; #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY - void PersistDeviceList(); - void FreeRendezvousSession(); CHIP_ERROR LoadKeyId(PersistentStorageDelegate * delegate, uint16_t & out); void OnSessionEstablishmentTimeout(); + //////////// ExchangeMgrDelegate Implementation /////////////// + void OnNewConnection(SessionHandle session, Messaging::ExchangeManager * mgr) override; + void OnConnectionExpired(SessionHandle session, Messaging::ExchangeManager * mgr) override; + static void OnSessionEstablishmentTimeoutCallback(System::Layer * aLayer, void * aAppState); /* This function sends a Device Attestation Certificate chain request to the device. The function does not hold a reference to the device object. */ - CHIP_ERROR SendCertificateChainRequestCommand(Device * device, Credentials::CertificateType certificateType); + CHIP_ERROR SendCertificateChainRequestCommand(CommissioneeDeviceProxy * device, Credentials::CertificateType certificateType); /* This function sends an Attestation request to the device. The function does not hold a reference to the device object. */ - CHIP_ERROR SendAttestationRequestCommand(Device * device, const ByteSpan & attestationNonce); + CHIP_ERROR SendAttestationRequestCommand(CommissioneeDeviceProxy * device, const ByteSpan & attestationNonce); /* This function sends an OpCSR request to the device. The function does not hold a refernce to the device object. */ - CHIP_ERROR SendOperationalCertificateSigningRequestCommand(Device * device); + CHIP_ERROR SendOperationalCertificateSigningRequestCommand(CommissioneeDeviceProxy * device); /* This function sends the operational credentials to the device. The function does not hold a refernce to the device object. */ - CHIP_ERROR SendOperationalCertificate(Device * device, const ByteSpan & nocCertBuf, const ByteSpan & icaCertBuf); + CHIP_ERROR SendOperationalCertificate(CommissioneeDeviceProxy * device, const ByteSpan & nocCertBuf, + const ByteSpan & icaCertBuf); /* This function sends the trusted root certificate to the device. The function does not hold a refernce to the device object. */ - CHIP_ERROR SendTrustedRootCertificate(Device * device, const ByteSpan & rcac); + CHIP_ERROR SendTrustedRootCertificate(CommissioneeDeviceProxy * device, const ByteSpan & rcac); /* This function is called by the commissioner code when the device completes the operational credential provisioning process. The function does not hold a refernce to the device object. */ - CHIP_ERROR OnOperationalCredentialsProvisioningCompletion(Device * device); + CHIP_ERROR OnOperationalCredentialsProvisioningCompletion(CommissioneeDeviceProxy * device); /* Callback when the previously sent CSR request results in failure */ static void OnCSRFailureResponse(void * context, uint8_t status); @@ -672,7 +710,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, /* Callback called when adding root cert to device results in failure */ static void OnRootCertFailureResponse(void * context, uint8_t status); - static void OnDeviceConnectedFn(void * context, Device * device); + static void OnDeviceConnectedFn(void * context, DeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); static void OnDeviceNOCChainGeneration(void * context, CHIP_ERROR status, const ByteSpan & noc, const ByteSpan & icac, @@ -705,6 +743,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void HandleAttestationResult(CHIP_ERROR err); + CommissioneeDeviceProxy * FindCommissioneeDevice(SessionHandle session); + CommissioneeDeviceProxy * FindCommissioneeDevice(NodeId id); + void ReleaseCommissioneeDevice(CommissioneeDeviceProxy * device); + // Cluster callbacks for advancing commissioning flows Callback::Callback mSuccess; Callback::Callback mFailure; @@ -728,8 +770,6 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, Callback::Callback mDeviceNOCChainCallback; SetUpCodePairer mSetUpCodePairer; - - PASESession mPairingSession; }; } // namespace Controller diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index f2d04909868f2c..5d0ab170d28ece 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -29,19 +29,35 @@ #pragma once -#include +#include #include +#include #include +#include #if CONFIG_DEVICE_LAYER #include #endif #if CONFIG_NETWORK_LAYER_BLE #include +#include #endif namespace chip { +constexpr size_t kMaxDeviceTransportBlePendingPackets = 1; + +using DeviceTransportMgr = TransportMgr /* BLE */ +#endif + >; + namespace Controller { struct DeviceControllerSystemStateParams diff --git a/src/controller/CommissioneeDeviceProxy.cpp b/src/controller/CommissioneeDeviceProxy.cpp new file mode 100644 index 00000000000000..f91d17e8ab3e3c --- /dev/null +++ b/src/controller/CommissioneeDeviceProxy.cpp @@ -0,0 +1,336 @@ +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * This file contains implementation of Device class. The objects of this + * class will be used by Controller applications to interact with CHIP + * devices. The class provides mechanism to construct, send and receive + * messages to and from the corresponding CHIP devices. + */ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip::Callback; + +namespace chip { + +// TODO - Refactor LoadSecureSessionParametersIfNeeded() as device object is no longer persisted +CHIP_ERROR CommissioneeDeviceProxy::LoadSecureSessionParametersIfNeeded(bool & didLoad) +{ + didLoad = false; + + // If there is no secure connection to the device, try establishing it + if (mState != ConnectionState::SecureConnected) + { + ReturnErrorOnFailure(LoadSecureSessionParameters()); + didLoad = true; + } + else + { + if (mSecureSession.HasValue()) + { + Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value()); + // Check if the connection state has the correct transport information + if (secureSession->GetPeerAddress().GetTransportType() == Transport::Type::kUndefined) + { + mState = ConnectionState::NotConnected; + ReturnErrorOnFailure(LoadSecureSessionParameters()); + didLoad = true; + } + } + else + { + mState = ConnectionState::NotConnected; + ReturnErrorOnFailure(LoadSecureSessionParameters()); + didLoad = true; + } + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissioneeDeviceProxy::SendCommands(app::CommandSender * commandObj) +{ + bool loadedSecureSession = false; + ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(loadedSecureSession)); + VerifyOrReturnError(commandObj != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + return commandObj->SendCommandRequest(mSecureSession.Value()); +} + +void CommissioneeDeviceProxy::OnNewConnection(SessionHandle session) +{ + mState = ConnectionState::SecureConnected; + mSecureSession.SetValue(session); + + // Reset the message counters here because this is the first time we get a handle to the secure session. + // Since CHIPDevices can be serialized/deserialized in the middle of what is conceptually a single PASE session + // we need to restore the session counters along with the session information. + Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value()); + VerifyOrReturn(secureSession != nullptr); + MessageCounter & localCounter = secureSession->GetSessionMessageCounter().GetLocalMessageCounter(); + if (localCounter.SetCounter(mLocalMessageCounter) != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Unable to restore local counter to %" PRIu32, mLocalMessageCounter); + } + Transport::PeerMessageCounter & peerCounter = secureSession->GetSessionMessageCounter().GetPeerMessageCounter(); + peerCounter.SetCounter(mPeerMessageCounter); +} + +void CommissioneeDeviceProxy::OnConnectionExpired(SessionHandle session) +{ + VerifyOrReturn(mSecureSession.HasValue() && mSecureSession.Value() == session, + ChipLogDetail(Controller, "Connection expired, but it doesn't match the current session")); + mState = ConnectionState::NotConnected; + mSecureSession.ClearValue(); +} + +CHIP_ERROR CommissioneeDeviceProxy::OnMessageReceived(Messaging::ExchangeContext * exchange, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && msgBuf) +{ + if (mState == ConnectionState::SecureConnected) + { + if (mStatusDelegate != nullptr) + { + mStatusDelegate->OnMessage(std::move(msgBuf)); + } + else + { + HandleDataModelMessage(exchange, std::move(msgBuf)); + } + } + return CHIP_NO_ERROR; +} + +void CommissioneeDeviceProxy::OnResponseTimeout(Messaging::ExchangeContext * ec) {} + +CHIP_ERROR CommissioneeDeviceProxy::CloseSession() +{ + ReturnErrorCodeIf(mState != ConnectionState::SecureConnected, CHIP_ERROR_INCORRECT_STATE); + if (mSecureSession.HasValue()) + { + mSessionManager->ExpirePairing(mSecureSession.Value()); + } + mState = ConnectionState::NotConnected; + mPairing.Clear(); + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissioneeDeviceProxy::UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, + uint32_t mrpActiveInterval) +{ + bool didLoad; + + mDeviceAddress = addr; + + mMrpIdleInterval = mrpIdleInterval; + mMrpActiveInterval = mrpActiveInterval; + + ReturnErrorOnFailure(LoadSecureSessionParametersIfNeeded(didLoad)); + + if (!mSecureSession.HasValue()) + { + // Nothing needs to be done here. It's not an error to not have a + // secureSession. For one thing, we could have gotten an different + // UpdateAddress already and that caused connections to be torn down and + // whatnot. + return CHIP_NO_ERROR; + } + + Transport::SecureSession * secureSession = mSessionManager->GetSecureSession(mSecureSession.Value()); + secureSession->SetPeerAddress(addr); + secureSession->SetMRPIntervals(mrpIdleInterval, mrpActiveInterval); + + return CHIP_NO_ERROR; +} + +void CommissioneeDeviceProxy::Reset() +{ + SetActive(false); + + mState = ConnectionState::NotConnected; + mSessionManager = nullptr; + mStatusDelegate = nullptr; + mInetLayer = nullptr; +#if CONFIG_NETWORK_LAYER_BLE + mBleLayer = nullptr; +#endif + if (mExchangeMgr) + { + // Ensure that any exchange contexts we have open get closed now, + // because we don't want them to call back in to us after this + // point. + mExchangeMgr->CloseAllContextsForDelegate(this); + } + mExchangeMgr = nullptr; + + ReleaseDAC(); + ReleasePAI(); +} + +CHIP_ERROR CommissioneeDeviceProxy::LoadSecureSessionParameters() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (mSessionManager == nullptr || mState == ConnectionState::SecureConnected) + { + ExitNow(err = CHIP_ERROR_INCORRECT_STATE); + } + + if (mState == ConnectionState::Connecting) + { + ExitNow(err = CHIP_NO_ERROR); + } + + err = mSessionManager->NewPairing(Optional::Value(mDeviceAddress), mDeviceId, &mPairing, + CryptoContext::SessionRole::kInitiator, mFabricIndex); + SuccessOrExit(err); + +exit: + + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "LoadSecureSessionParameters returning error %" CHIP_ERROR_FORMAT, err.Format()); + } + return err; +} + +bool CommissioneeDeviceProxy::GetAddress(Inet::IPAddress & addr, uint16_t & port) const +{ + if (mState == ConnectionState::NotConnected) + return false; + + addr = mDeviceAddress.GetIPAddress(); + port = mDeviceAddress.GetPort(); + return true; +} + +void CommissioneeDeviceProxy::ReleaseDAC() +{ + if (mDAC != nullptr) + { + Platform::MemoryFree(mDAC); + } + mDACLen = 0; + mDAC = nullptr; +} + +CHIP_ERROR CommissioneeDeviceProxy::SetDAC(const ByteSpan & dac) +{ + if (dac.size() == 0) + { + ReleaseDAC(); + return CHIP_NO_ERROR; + } + + VerifyOrReturnError(dac.size() <= Credentials::kMaxDERCertLength, CHIP_ERROR_INVALID_ARGUMENT); + if (mDACLen != 0) + { + ReleaseDAC(); + } + + VerifyOrReturnError(CanCastTo(dac.size()), CHIP_ERROR_INVALID_ARGUMENT); + if (mDAC == nullptr) + { + mDAC = static_cast(chip::Platform::MemoryAlloc(dac.size())); + } + VerifyOrReturnError(mDAC != nullptr, CHIP_ERROR_NO_MEMORY); + mDACLen = static_cast(dac.size()); + memcpy(mDAC, dac.data(), mDACLen); + + return CHIP_NO_ERROR; +} + +void CommissioneeDeviceProxy::ReleasePAI() +{ + if (mPAI != nullptr) + { + chip::Platform::MemoryFree(mPAI); + } + mPAILen = 0; + mPAI = nullptr; +} + +CHIP_ERROR CommissioneeDeviceProxy::SetPAI(const chip::ByteSpan & pai) +{ + if (pai.size() == 0) + { + ReleasePAI(); + return CHIP_NO_ERROR; + } + + VerifyOrReturnError(pai.size() <= Credentials::kMaxDERCertLength, CHIP_ERROR_INVALID_ARGUMENT); + if (mPAILen != 0) + { + ReleasePAI(); + } + + VerifyOrReturnError(CanCastTo(pai.size()), CHIP_ERROR_INVALID_ARGUMENT); + if (mPAI == nullptr) + { + mPAI = static_cast(chip::Platform::MemoryAlloc(pai.size())); + } + VerifyOrReturnError(mPAI != nullptr, CHIP_ERROR_NO_MEMORY); + mPAILen = static_cast(pai.size()); + memcpy(mPAI, pai.data(), mPAILen); + + return CHIP_NO_ERROR; +} + +CommissioneeDeviceProxy::~CommissioneeDeviceProxy() +{ + if (mExchangeMgr) + { + // Ensure that any exchange contexts we have open get closed now, + // because we don't want them to call back in to us after this + // point. + mExchangeMgr->CloseAllContextsForDelegate(this); + } + + ReleaseDAC(); + ReleasePAI(); +} + +CHIP_ERROR CommissioneeDeviceProxy::SetNOCCertBufferSize(size_t new_size) +{ + ReturnErrorCodeIf(new_size > sizeof(mNOCCertBuffer), CHIP_ERROR_INVALID_ARGUMENT); + mNOCCertBufferSize = new_size; + return CHIP_NO_ERROR; +} + +CHIP_ERROR CommissioneeDeviceProxy::SetICACertBufferSize(size_t new_size) +{ + ReturnErrorCodeIf(new_size > sizeof(mICACertBuffer), CHIP_ERROR_INVALID_ARGUMENT); + mICACertBufferSize = new_size; + return CHIP_NO_ERROR; +} + +} // namespace chip diff --git a/src/controller/CommissioneeDeviceProxy.h b/src/controller/CommissioneeDeviceProxy.h new file mode 100644 index 00000000000000..81b59820c1f223 --- /dev/null +++ b/src/controller/CommissioneeDeviceProxy.h @@ -0,0 +1,394 @@ +/* + * + * Copyright (c) 2020-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. + */ + +/** + * @file + * This file contains definitions for DeviceProxy for a device that's undergoing + * commissioning process. The objects of this will be used by Controller applications + * to interact with the device. The class provides mechanism to construct, send and receive + * messages to and from the corresponding CHIP devices. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if CONFIG_NETWORK_LAYER_BLE +#include +#include +#endif + +namespace chip { + +class DeviceStatusDelegate; + +constexpr size_t kOpCSRNonceLength = 32; +constexpr size_t kAttestationNonceLength = 32; + +using DeviceIPTransportMgr = TransportMgr; + +struct ControllerDeviceInitParams +{ + DeviceTransportMgr * transportMgr = nullptr; + SessionManager * sessionManager = nullptr; + Messaging::ExchangeManager * exchangeMgr = nullptr; + Inet::InetLayer * inetLayer = nullptr; + PersistentStorageDelegate * storageDelegate = nullptr; + SessionIDAllocator * idAllocator = nullptr; +#if CONFIG_NETWORK_LAYER_BLE + Ble::BleLayer * bleLayer = nullptr; +#endif + FabricTable * fabricsTable = nullptr; + + Controller::DeviceControllerInteractionModelDelegate * imDelegate = nullptr; +}; + +class CommissioneeDeviceProxy : public DeviceProxy, Messaging::ExchangeDelegate +{ +public: + ~CommissioneeDeviceProxy(); + CommissioneeDeviceProxy() {} + CommissioneeDeviceProxy(const CommissioneeDeviceProxy &) = delete; + + /** + * @brief + * Set the delegate object which will be called when a message is received. + * The user of this Device object must reset the delegate (by calling + * SetDelegate(nullptr)) before releasing their delegate object. + * + * @param[in] delegate The pointer to the delegate object. + */ + void SetDelegate(DeviceStatusDelegate * delegate) { mStatusDelegate = delegate; } + + /** + * @brief + * Send the command in internal command sender. + */ + CHIP_ERROR SendCommands(app::CommandSender * commandObj) override; + + /** + * @brief Get the IP address and port assigned to the device. + * + * @param[out] addr IP address of the device. + * @param[out] port Port number of the device. + * + * @return true, if the IP address and port were filled in the out parameters, false otherwise + */ + bool GetAddress(Inet::IPAddress & addr, uint16_t & port) const override; + + /** + * @brief + * Initialize the device object with secure session manager and inet layer object + * references. This variant of function is typically used when the device object + * is created from a serialized device information. The other parameters (address, port, + * interface etc) are part of the serialized device, so those are not required to be + * initialized. + * + * Note: The lifetime of session manager and inet layer objects must be longer than + * that of this device object. If these objects are freed, while the device object is + * still using them, it can lead to unknown behavior and crashes. + * + * @param[in] params Wrapper object for transport manager etc. + * @param[in] fabric Local administrator that's initializing this device object + */ + void Init(ControllerDeviceInitParams params, FabricIndex fabric) + { + mSessionManager = params.sessionManager; + mExchangeMgr = params.exchangeMgr; + mInetLayer = params.inetLayer; + mFabricIndex = fabric; + mIDAllocator = params.idAllocator; + mpIMDelegate = params.imDelegate; +#if CONFIG_NETWORK_LAYER_BLE + mBleLayer = params.bleLayer; +#endif + } + + /** + * @brief + * Initialize a new device object with secure session manager, inet layer object, + * and other device specific parameters. This variant of function is typically used when + * a new device is paired, and the corresponding device object needs to updated with + * all device specifc parameters (address, port, interface etc). + * + * This is not done as part of constructor so that the controller can have a list of + * uninitialized/unpaired device objects. The object is initialized only when the device + * is actually paired. + * + * @param[in] params Wrapper object for transport manager etc. + * @param[in] deviceId Node ID of the device + * @param[in] peerAddress The location of the peer. MUST be of type Transport::Type::kUdp + * @param[in] fabric Local administrator that's initializing this device object + */ + void Init(ControllerDeviceInitParams params, NodeId deviceId, const Transport::PeerAddress & peerAddress, FabricIndex fabric) + { + Init(params, fabric); + mDeviceId = deviceId; + mState = ConnectionState::Connecting; + + mDeviceAddress = peerAddress; + } + + /** + * @brief + * Called when a new pairing is being established + * + * @param session A handle to the secure session + */ + void OnNewConnection(SessionHandle session); + + /** + * @brief + * Called when a connection is closing. + * + * The receiver should release all resources associated with the connection. + * + * @param session A handle to the secure session + */ + void OnConnectionExpired(SessionHandle session) override; + + /** + * @brief + * This function is called when a message is received from the corresponding CHIP + * device. The message ownership is transferred to the function, and it is expected + * to release the message buffer before returning. + * + * @param[in] exchange The exchange context the message was received + * on. The Device guarantees that it will call + * Close() on exchange when it's done processing + * the message. + * @param[in] payloadHeader Reference to payload header in the message + * @param[in] msgBuf The message buffer + */ + CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * exchange, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && msgBuf) override; + + /** + * @brief ExchangeDelegate implementation of OnResponseTimeout. + */ + void OnResponseTimeout(Messaging::ExchangeContext * exchange) override; + + /** + * In case there exists an open session to the device, mark it as expired. + */ + CHIP_ERROR CloseSession(); + + CHIP_ERROR Disconnect() override { return CloseSession(); } + + /** + * @brief + * Update data of the device. + * + * This function will set new IP address, port and MRP retransmission intervals of the device. + * Since the device settings might have been moved from RAM to the persistent storage, the function + * will load the device settings first, before making the changes. + * + * @param[in] addr Address of the device to be set. + * @param[in] mrpIdleInterval MRP idle retransmission interval of the device to be set. + * @param[in] mrpActiveInterval MRP active retransmision interval of the device to be set. + * + * @return CHIP_NO_ERROR if the data has been updated, an error code otherwise. + */ + CHIP_ERROR UpdateDeviceData(const Transport::PeerAddress & addr, uint32_t mrpIdleInterval, uint32_t mrpActiveInterval); + /** + * @brief + * Return whether the current device object is actively associated with a paired CHIP + * device. An active object can be used to communicate with the corresponding device. + */ + bool IsActive() const override { return mActive; } + + void SetActive(bool active) { mActive = active; } + + bool IsSecureConnected() const override { return IsActive() && mState == ConnectionState::SecureConnected; } + + bool IsSessionSetupInProgress() const { return IsActive() && mState == ConnectionState::Connecting; } + + void Reset(); + + NodeId GetDeviceId() const override { return mDeviceId; } + + bool MatchesSession(SessionHandle session) const { return mSecureSession.HasValue() && mSecureSession.Value() == session; } + + chip::Optional GetSecureSession() const override { return mSecureSession; } + + Messaging::ExchangeManager * GetExchangeManager() const override { return mExchangeMgr; } + + void SetAddress(const Inet::IPAddress & deviceAddr) { mDeviceAddress.SetIPAddress(deviceAddr); } + + PASESession & GetPairing() { return mPairing; } + + uint8_t GetNextSequenceNumber() override { return mSequenceNumber++; }; + + CHIP_ERROR LoadSecureSessionParametersIfNeeded() + { + bool loadedSecureSession = false; + return LoadSecureSessionParametersIfNeeded(loadedSecureSession); + }; + + CHIP_ERROR SetCSRNonce(ByteSpan csrNonce) + { + VerifyOrReturnError(csrNonce.size() == sizeof(mCSRNonce), CHIP_ERROR_INVALID_ARGUMENT); + memcpy(mCSRNonce, csrNonce.data(), csrNonce.size()); + return CHIP_NO_ERROR; + } + + ByteSpan GetCSRNonce() const { return ByteSpan(mCSRNonce, sizeof(mCSRNonce)); } + + CHIP_ERROR SetAttestationNonce(ByteSpan attestationNonce) + { + VerifyOrReturnError(attestationNonce.size() == sizeof(mAttestationNonce), CHIP_ERROR_INVALID_ARGUMENT); + memcpy(mAttestationNonce, attestationNonce.data(), attestationNonce.size()); + return CHIP_NO_ERROR; + } + + ByteSpan GetAttestationNonce() const { return ByteSpan(mAttestationNonce, sizeof(mAttestationNonce)); } + + bool AreCredentialsAvailable() const { return (mDAC != nullptr && mDACLen != 0); } + + ByteSpan GetDAC() const { return ByteSpan(mDAC, mDACLen); } + ByteSpan GetPAI() const { return ByteSpan(mPAI, mPAILen); } + + CHIP_ERROR SetDAC(const ByteSpan & dac); + CHIP_ERROR SetPAI(const ByteSpan & pai); + + MutableByteSpan GetMutableNOCCert() { return MutableByteSpan(mNOCCertBuffer, sizeof(mNOCCertBuffer)); } + + CHIP_ERROR SetNOCCertBufferSize(size_t new_size); + + ByteSpan GetNOCCert() const { return ByteSpan(mNOCCertBuffer, mNOCCertBufferSize); } + + MutableByteSpan GetMutableICACert() { return MutableByteSpan(mICACertBuffer, sizeof(mICACertBuffer)); } + + CHIP_ERROR SetICACertBufferSize(size_t new_size); + + ByteSpan GetICACert() const { return ByteSpan(mICACertBuffer, mICACertBufferSize); } + + Controller::DeviceControllerInteractionModelDelegate * GetInteractionModelDelegate() override { return mpIMDelegate; }; + +private: + enum class ConnectionState + { + NotConnected, + Connecting, + SecureConnected, + }; + + enum class ResetTransport + { + kYes, + kNo, + }; + /* Node ID assigned to the CHIP device */ + NodeId mDeviceId; + + /** Address used to communicate with the device. + */ + Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); + + Inet::InetLayer * mInetLayer = nullptr; + + bool mActive = false; + ConnectionState mState = ConnectionState::NotConnected; + +#if CONFIG_NETWORK_LAYER_BLE + Ble::BleLayer * mBleLayer = nullptr; +#endif + + PASESession mPairing; + + DeviceStatusDelegate * mStatusDelegate = nullptr; + + SessionManager * mSessionManager = nullptr; + + Messaging::ExchangeManager * mExchangeMgr = nullptr; + + Optional mSecureSession = Optional::Missing(); + + Controller::DeviceControllerInteractionModelDelegate * mpIMDelegate = nullptr; + + uint8_t mSequenceNumber = 0; + + uint32_t mLocalMessageCounter = 0; + uint32_t mPeerMessageCounter = 0; + + /** + * @brief + * This function loads the secure session object from the serialized operational + * credentials corresponding to the device. This is typically done when the device + * does not have an active secure channel. + */ + CHIP_ERROR LoadSecureSessionParameters(); + + /** + * @brief + * This function loads the secure session object from the serialized operational + * credentials corresponding if needed, based on the current state of the device and + * underlying transport object. + * + * @param[out] didLoad Were the secure session params loaded by the call to this function. + */ + CHIP_ERROR LoadSecureSessionParametersIfNeeded(bool & didLoad); + + void ReleaseDAC(); + void ReleasePAI(); + + FabricIndex mFabricIndex = kUndefinedFabricIndex; + + // TODO: Offload Nonces and DAC/PAI into a new struct + uint8_t mCSRNonce[kOpCSRNonceLength]; + uint8_t mAttestationNonce[kAttestationNonceLength]; + + uint8_t * mDAC = nullptr; + uint16_t mDACLen = 0; + uint8_t * mPAI = nullptr; + uint16_t mPAILen = 0; + + uint8_t mNOCCertBuffer[Credentials::kMaxCHIPCertLength]; + size_t mNOCCertBufferSize = 0; + + uint8_t mICACertBuffer[Credentials::kMaxCHIPCertLength]; + size_t mICACertBufferSize = 0; + + SessionIDAllocator * mIDAllocator = nullptr; +}; + +} // namespace chip diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index c5f76f9998266c..c498c802b187d6 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -44,7 +44,7 @@ GetConnectedDeviceCallback::~GetConnectedDeviceCallback() env->DeleteGlobalRef(mJavaCallbackRef); } -void GetConnectedDeviceCallback::OnDeviceConnectedFn(void * context, Device * device) +void GetConnectedDeviceCallback::OnDeviceConnectedFn(void * context, DeviceProxy * device) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); auto * self = static_cast(context); diff --git a/src/controller/java/AndroidCallbacks.h b/src/controller/java/AndroidCallbacks.h index 5c415c9519b5c7..123c2fdb10aeb9 100644 --- a/src/controller/java/AndroidCallbacks.h +++ b/src/controller/java/AndroidCallbacks.h @@ -28,7 +28,7 @@ struct GetConnectedDeviceCallback GetConnectedDeviceCallback(jobject javaCallback); ~GetConnectedDeviceCallback(); - static void OnDeviceConnectedFn(void * context, Device * device); + static void OnDeviceConnectedFn(void * context, DeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId nodeId, CHIP_ERROR error); Callback::Callback mOnSuccess; diff --git a/src/controller/java/AndroidDeviceControllerWrapper.h b/src/controller/java/AndroidDeviceControllerWrapper.h index 3c1ef3f663596e..83f35ba06cb60c 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.h +++ b/src/controller/java/AndroidDeviceControllerWrapper.h @@ -35,7 +35,7 @@ * Generally it contains the DeviceController class itself, plus any related delegates/callbacks. */ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDelegate, - public chip::Controller::DeviceStatusDelegate, + public chip::DeviceStatusDelegate, public chip::Controller::OperationalCredentialsDelegate, public chip::PersistentStorageDelegate, public chip::FabricStorage diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 1b9c073df72636..c708f843f619fa 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -293,14 +293,14 @@ JNI_METHOD(void, disconnectDevice)(JNIEnv * env, jobject self, jlong handle, jlo AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); ChipLogProgress(Controller, "disconnectDevice() called with deviceId"); - wrapper->Controller()->ReleaseDeviceById(deviceId); + wrapper->Controller()->ReleaseOperationalDevice(deviceId); } JNI_METHOD(jboolean, isActive)(JNIEnv * env, jobject self, jlong handle) { chip::DeviceLayer::StackLock lock; - Device * chipDevice = reinterpret_cast(handle); + DeviceProxy * chipDevice = reinterpret_cast(handle); return chipDevice->IsActive(); } @@ -308,7 +308,7 @@ JNI_METHOD(void, shutdownSubscriptions)(JNIEnv * env, jobject self, jlong handle { chip::DeviceLayer::StackLock lock; - Device * device = reinterpret_cast(devicePtr); + DeviceProxy * device = reinterpret_cast(devicePtr); device->ShutdownSubscriptions(); } @@ -366,15 +366,15 @@ JNI_METHOD(jboolean, openPairingWindow)(JNIEnv * env, jobject self, jlong handle CHIP_ERROR err = CHIP_NO_ERROR; chip::SetupPayload setupPayload; - Device * chipDevice = reinterpret_cast(devicePtr); + DeviceProxy * chipDevice = reinterpret_cast(devicePtr); if (chipDevice == nullptr) { ChipLogProgress(Controller, "Could not cast device pointer to Device object"); return false; } - err = chipDevice->OpenPairingWindow(duration, chip::Controller::Device::CommissioningWindowOption::kOriginalSetupCode, - setupPayload); + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + err = wrapper->Controller()->OpenCommissioningWindow(chipDevice->GetDeviceId(), duration, 0, 0, 0, setupPayload); if (err != CHIP_NO_ERROR) { @@ -394,15 +394,15 @@ JNI_METHOD(jboolean, openPairingWindowWithPIN) setupPayload.discriminator = discriminator; setupPayload.setUpPINCode = setupPinCode; - Device * chipDevice = reinterpret_cast(devicePtr); + DeviceProxy * chipDevice = reinterpret_cast(devicePtr); if (chipDevice == nullptr) { ChipLogProgress(Controller, "Could not cast device pointer to Device object"); return false; } - err = chipDevice->OpenPairingWindow(duration, chip::Controller::Device::CommissioningWindowOption::kTokenWithRandomPIN, - setupPayload); + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + err = wrapper->Controller()->OpenCommissioningWindow(chipDevice->GetDeviceId(), duration, 1000, discriminator, 1, setupPayload); if (err != CHIP_NO_ERROR) { @@ -431,8 +431,7 @@ JNI_METHOD(jobject, computePaseVerifier) { chip::DeviceLayer::StackLock lock; - Device * chipDevice = nullptr; - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; jobject params; jbyteArray verifierBytes; uint32_t passcodeId; @@ -441,10 +440,8 @@ JNI_METHOD(jobject, computePaseVerifier) ChipLogProgress(Controller, "computePaseVerifier() called"); - chipDevice = reinterpret_cast(devicePtr); - VerifyOrExit(chipDevice != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - - err = chipDevice->ComputePASEVerifier(iterations, setupPincode, jniSalt.byteSpan(), verifier, passcodeId); + AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); + err = wrapper->Controller()->ComputePASEVerifier(iterations, setupPincode, jniSalt.byteSpan(), verifier, passcodeId); SuccessOrExit(err); uint8_t serializedVerifier[sizeof(verifier.mW0) + sizeof(verifier.mL)]; diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index de32ed3b0642c8..2359c43aaa8cbc 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -141,7 +141,7 @@ JNI_METHOD(jlong, {{asUpperCamelCase name}}Cluster, initWithDevice)(JNIEnv * env chip::DeviceLayer::StackLock lock; {{asUpperCamelCase name}}Cluster * cppCluster = new {{asUpperCamelCase name}}Cluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index b81db6da78a7c4..6e0e2defc8b83b 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -5435,7 +5435,7 @@ JNI_METHOD(jlong, AccountLoginCluster, initWithDevice)(JNIEnv * env, jobject sel chip::DeviceLayer::StackLock lock; AccountLoginCluster * cppCluster = new AccountLoginCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -5550,7 +5550,7 @@ JNI_METHOD(jlong, AdministratorCommissioningCluster, initWithDevice)(JNIEnv * en chip::DeviceLayer::StackLock lock; AdministratorCommissioningCluster * cppCluster = new AdministratorCommissioningCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -5710,7 +5710,7 @@ JNI_METHOD(jlong, ApplicationBasicCluster, initWithDevice)(JNIEnv * env, jobject chip::DeviceLayer::StackLock lock; ApplicationBasicCluster * cppCluster = new ApplicationBasicCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -5766,7 +5766,7 @@ JNI_METHOD(jlong, ApplicationLauncherCluster, initWithDevice)(JNIEnv * env, jobj chip::DeviceLayer::StackLock lock; ApplicationLauncherCluster * cppCluster = new ApplicationLauncherCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -5829,7 +5829,7 @@ JNI_METHOD(jlong, AudioOutputCluster, initWithDevice)(JNIEnv * env, jobject self chip::DeviceLayer::StackLock lock; AudioOutputCluster * cppCluster = new AudioOutputCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -5936,7 +5936,7 @@ JNI_METHOD(jlong, BarrierControlCluster, initWithDevice)(JNIEnv * env, jobject s chip::DeviceLayer::StackLock lock; BarrierControlCluster * cppCluster = new BarrierControlCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -6040,7 +6040,7 @@ JNI_METHOD(jlong, BasicCluster, initWithDevice)(JNIEnv * env, jobject self, jlon chip::DeviceLayer::StackLock lock; BasicCluster * cppCluster = new BasicCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -6193,7 +6193,7 @@ JNI_METHOD(jlong, BinaryInputBasicCluster, initWithDevice)(JNIEnv * env, jobject chip::DeviceLayer::StackLock lock; BinaryInputBasicCluster * cppCluster = new BinaryInputBasicCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -6375,7 +6375,7 @@ JNI_METHOD(jlong, BindingCluster, initWithDevice)(JNIEnv * env, jobject self, jl chip::DeviceLayer::StackLock lock; BindingCluster * cppCluster = new BindingCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -6480,7 +6480,7 @@ JNI_METHOD(jlong, BooleanStateCluster, initWithDevice)(JNIEnv * env, jobject sel chip::DeviceLayer::StackLock lock; BooleanStateCluster * cppCluster = new BooleanStateCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -6543,7 +6543,7 @@ JNI_METHOD(jlong, BridgedActionsCluster, initWithDevice)(JNIEnv * env, jobject s chip::DeviceLayer::StackLock lock; BridgedActionsCluster * cppCluster = new BridgedActionsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -7128,7 +7128,7 @@ JNI_METHOD(jlong, BridgedDeviceBasicCluster, initWithDevice)(JNIEnv * env, jobje chip::DeviceLayer::StackLock lock; BridgedDeviceBasicCluster * cppCluster = new BridgedDeviceBasicCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -7169,7 +7169,7 @@ JNI_METHOD(jlong, ColorControlCluster, initWithDevice)(JNIEnv * env, jobject sel chip::DeviceLayer::StackLock lock; ColorControlCluster * cppCluster = new ColorControlCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -8803,7 +8803,7 @@ JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject chip::DeviceLayer::StackLock lock; ContentLauncherCluster * cppCluster = new ContentLauncherCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -8920,7 +8920,7 @@ JNI_METHOD(jlong, DescriptorCluster, initWithDevice)(JNIEnv * env, jobject self, chip::DeviceLayer::StackLock lock; DescriptorCluster * cppCluster = new DescriptorCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -8929,7 +8929,7 @@ JNI_METHOD(jlong, DiagnosticLogsCluster, initWithDevice)(JNIEnv * env, jobject s chip::DeviceLayer::StackLock lock; DiagnosticLogsCluster * cppCluster = new DiagnosticLogsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -8993,7 +8993,7 @@ JNI_METHOD(jlong, DoorLockCluster, initWithDevice)(JNIEnv * env, jobject self, j chip::DeviceLayer::StackLock lock; DoorLockCluster * cppCluster = new DoorLockCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10205,7 +10205,7 @@ JNI_METHOD(jlong, ElectricalMeasurementCluster, initWithDevice)(JNIEnv * env, jo chip::DeviceLayer::StackLock lock; ElectricalMeasurementCluster * cppCluster = new ElectricalMeasurementCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10214,7 +10214,7 @@ JNI_METHOD(jlong, EthernetNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * en chip::DeviceLayer::StackLock lock; EthernetNetworkDiagnosticsCluster * cppCluster = new EthernetNetworkDiagnosticsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10270,7 +10270,7 @@ JNI_METHOD(jlong, FixedLabelCluster, initWithDevice)(JNIEnv * env, jobject self, chip::DeviceLayer::StackLock lock; FixedLabelCluster * cppCluster = new FixedLabelCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10279,7 +10279,7 @@ JNI_METHOD(jlong, FlowMeasurementCluster, initWithDevice)(JNIEnv * env, jobject chip::DeviceLayer::StackLock lock; FlowMeasurementCluster * cppCluster = new FlowMeasurementCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10288,7 +10288,7 @@ JNI_METHOD(jlong, GeneralCommissioningCluster, initWithDevice)(JNIEnv * env, job chip::DeviceLayer::StackLock lock; GeneralCommissioningCluster * cppCluster = new GeneralCommissioningCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10482,7 +10482,7 @@ JNI_METHOD(jlong, GeneralDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobje chip::DeviceLayer::StackLock lock; GeneralDiagnosticsCluster * cppCluster = new GeneralDiagnosticsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10491,7 +10491,7 @@ JNI_METHOD(jlong, GroupKeyManagementCluster, initWithDevice)(JNIEnv * env, jobje chip::DeviceLayer::StackLock lock; GroupKeyManagementCluster * cppCluster = new GroupKeyManagementCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10500,7 +10500,7 @@ JNI_METHOD(jlong, GroupsCluster, initWithDevice)(JNIEnv * env, jobject self, jlo chip::DeviceLayer::StackLock lock; GroupsCluster * cppCluster = new GroupsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10805,7 +10805,7 @@ JNI_METHOD(jlong, IdentifyCluster, initWithDevice)(JNIEnv * env, jobject self, j chip::DeviceLayer::StackLock lock; IdentifyCluster * cppCluster = new IdentifyCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -10989,7 +10989,7 @@ JNI_METHOD(jlong, IlluminanceMeasurementCluster, initWithDevice)(JNIEnv * env, j chip::DeviceLayer::StackLock lock; IlluminanceMeasurementCluster * cppCluster = new IlluminanceMeasurementCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -11053,7 +11053,7 @@ JNI_METHOD(jlong, KeypadInputCluster, initWithDevice)(JNIEnv * env, jobject self chip::DeviceLayer::StackLock lock; KeypadInputCluster * cppCluster = new KeypadInputCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -11110,7 +11110,7 @@ JNI_METHOD(jlong, LevelControlCluster, initWithDevice)(JNIEnv * env, jobject sel chip::DeviceLayer::StackLock lock; LevelControlCluster * cppCluster = new LevelControlCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -11779,7 +11779,7 @@ JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, j chip::DeviceLayer::StackLock lock; LowPowerCluster * cppCluster = new LowPowerCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -11835,7 +11835,7 @@ JNI_METHOD(jlong, MediaInputCluster, initWithDevice)(JNIEnv * env, jobject self, chip::DeviceLayer::StackLock lock; MediaInputCluster * cppCluster = new MediaInputCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -12036,7 +12036,7 @@ JNI_METHOD(jlong, MediaPlaybackCluster, initWithDevice)(JNIEnv * env, jobject se chip::DeviceLayer::StackLock lock; MediaPlaybackCluster * cppCluster = new MediaPlaybackCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -12586,7 +12586,7 @@ JNI_METHOD(jlong, ModeSelectCluster, initWithDevice)(JNIEnv * env, jobject self, chip::DeviceLayer::StackLock lock; ModeSelectCluster * cppCluster = new ModeSelectCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -12728,7 +12728,7 @@ JNI_METHOD(jlong, NetworkCommissioningCluster, initWithDevice)(JNIEnv * env, job chip::DeviceLayer::StackLock lock; NetworkCommissioningCluster * cppCluster = new NetworkCommissioningCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -13172,7 +13172,7 @@ JNI_METHOD(jlong, OtaSoftwareUpdateProviderCluster, initWithDevice)(JNIEnv * env chip::DeviceLayer::StackLock lock; OtaSoftwareUpdateProviderCluster * cppCluster = new OtaSoftwareUpdateProviderCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -13344,7 +13344,7 @@ JNI_METHOD(jlong, OtaSoftwareUpdateRequestorCluster, initWithDevice)(JNIEnv * en chip::DeviceLayer::StackLock lock; OtaSoftwareUpdateRequestorCluster * cppCluster = new OtaSoftwareUpdateRequestorCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -13439,7 +13439,7 @@ JNI_METHOD(jlong, OccupancySensingCluster, initWithDevice)(JNIEnv * env, jobject chip::DeviceLayer::StackLock lock; OccupancySensingCluster * cppCluster = new OccupancySensingCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -13502,7 +13502,7 @@ JNI_METHOD(jlong, OnOffCluster, initWithDevice)(JNIEnv * env, jobject self, jlon chip::DeviceLayer::StackLock lock; OnOffCluster * cppCluster = new OnOffCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -13943,7 +13943,7 @@ JNI_METHOD(jlong, OnOffSwitchConfigurationCluster, initWithDevice)(JNIEnv * env, chip::DeviceLayer::StackLock lock; OnOffSwitchConfigurationCluster * cppCluster = new OnOffSwitchConfigurationCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -13982,7 +13982,7 @@ JNI_METHOD(jlong, OperationalCredentialsCluster, initWithDevice)(JNIEnv * env, j chip::DeviceLayer::StackLock lock; OperationalCredentialsCluster * cppCluster = new OperationalCredentialsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -14467,7 +14467,7 @@ JNI_METHOD(jlong, PowerSourceCluster, initWithDevice)(JNIEnv * env, jobject self chip::DeviceLayer::StackLock lock; PowerSourceCluster * cppCluster = new PowerSourceCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -14476,7 +14476,7 @@ JNI_METHOD(jlong, PressureMeasurementCluster, initWithDevice)(JNIEnv * env, jobj chip::DeviceLayer::StackLock lock; PressureMeasurementCluster * cppCluster = new PressureMeasurementCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -14540,7 +14540,7 @@ JNI_METHOD(jlong, PumpConfigurationAndControlCluster, initWithDevice)(JNIEnv * e chip::DeviceLayer::StackLock lock; PumpConfigurationAndControlCluster * cppCluster = new PumpConfigurationAndControlCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -14722,7 +14722,7 @@ JNI_METHOD(jlong, RelativeHumidityMeasurementCluster, initWithDevice)(JNIEnv * e chip::DeviceLayer::StackLock lock; RelativeHumidityMeasurementCluster * cppCluster = new RelativeHumidityMeasurementCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -14842,7 +14842,7 @@ JNI_METHOD(jlong, ScenesCluster, initWithDevice)(JNIEnv * env, jobject self, jlo chip::DeviceLayer::StackLock lock; ScenesCluster * cppCluster = new ScenesCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -15196,7 +15196,7 @@ JNI_METHOD(jlong, SoftwareDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobj chip::DeviceLayer::StackLock lock; SoftwareDiagnosticsCluster * cppCluster = new SoftwareDiagnosticsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -15252,7 +15252,7 @@ JNI_METHOD(jlong, SwitchCluster, initWithDevice)(JNIEnv * env, jobject self, jlo chip::DeviceLayer::StackLock lock; SwitchCluster * cppCluster = new SwitchCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -15315,7 +15315,7 @@ JNI_METHOD(jlong, TvChannelCluster, initWithDevice)(JNIEnv * env, jobject self, chip::DeviceLayer::StackLock lock; TvChannelCluster * cppCluster = new TvChannelCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -15471,7 +15471,7 @@ JNI_METHOD(jlong, TargetNavigatorCluster, initWithDevice)(JNIEnv * env, jobject chip::DeviceLayer::StackLock lock; TargetNavigatorCluster * cppCluster = new TargetNavigatorCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -15533,7 +15533,7 @@ JNI_METHOD(jlong, TemperatureMeasurementCluster, initWithDevice)(JNIEnv * env, j chip::DeviceLayer::StackLock lock; TemperatureMeasurementCluster * cppCluster = new TemperatureMeasurementCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -15653,7 +15653,7 @@ JNI_METHOD(jlong, TestClusterCluster, initWithDevice)(JNIEnv * env, jobject self chip::DeviceLayer::StackLock lock; TestClusterCluster * cppCluster = new TestClusterCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -16930,7 +16930,7 @@ JNI_METHOD(jlong, ThermostatCluster, initWithDevice)(JNIEnv * env, jobject self, chip::DeviceLayer::StackLock lock; ThermostatCluster * cppCluster = new ThermostatCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -17515,7 +17515,7 @@ JNI_METHOD(jlong, ThermostatUserInterfaceConfigurationCluster, initWithDevice) chip::DeviceLayer::StackLock lock; ThermostatUserInterfaceConfigurationCluster * cppCluster = new ThermostatUserInterfaceConfigurationCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -17620,7 +17620,7 @@ JNI_METHOD(jlong, ThreadNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, chip::DeviceLayer::StackLock lock; ThreadNetworkDiagnosticsCluster * cppCluster = new ThreadNetworkDiagnosticsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -17676,7 +17676,7 @@ JNI_METHOD(jlong, WakeOnLanCluster, initWithDevice)(JNIEnv * env, jobject self, chip::DeviceLayer::StackLock lock; WakeOnLanCluster * cppCluster = new WakeOnLanCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -17685,7 +17685,7 @@ JNI_METHOD(jlong, WiFiNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, j chip::DeviceLayer::StackLock lock; WiFiNetworkDiagnosticsCluster * cppCluster = new WiFiNetworkDiagnosticsCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -17741,7 +17741,7 @@ JNI_METHOD(jlong, WindowCoveringCluster, initWithDevice)(JNIEnv * env, jobject s chip::DeviceLayer::StackLock lock; WindowCoveringCluster * cppCluster = new WindowCoveringCluster(); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index d94d8a9cfbf464..9405d7bba204ad 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -47,9 +47,9 @@ #include "chip/interaction_model/Delegate.h" #include +#include #include #include -#include #include #include #include @@ -77,7 +77,7 @@ static_assert(std::is_same::value, "python ass extern "C" { typedef void (*ConstructBytesArrayFunct)(const uint8_t * dataBuf, uint32_t dataLen); typedef void (*LogMessageFunct)(uint64_t time, uint64_t timeUS, const char * moduleName, uint8_t category, const char * msg); -typedef void (*DeviceAvailableFunc)(Device * device, ChipError::StorageType err); +typedef void (*DeviceAvailableFunc)(DeviceProxy * device, ChipError::StorageType err); typedef void (*ChipThreadTaskRunnerFunct)(intptr_t context); } @@ -163,7 +163,7 @@ void pychip_Stack_SetLogFunct(LogMessageFunct logFunct); ChipError::StorageType pychip_GetConnectedDeviceByNodeId(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeId, DeviceAvailableFunc callback); -uint64_t pychip_GetCommandSenderHandle(chip::Controller::Device * device); +uint64_t pychip_GetCommandSenderHandle(chip::DeviceProxy * device); // CHIP Stack objects ChipError::StorageType pychip_BLEMgrImpl_ConfigureBle(uint32_t bluetoothAdapterId); @@ -326,11 +326,11 @@ ChipError::StorageType pychip_DeviceController_ConnectIP(chip::Controller::Devic return devCtrl->PairDevice(nodeid, params).AsInteger(); } -void CloseSessionCallback(Device * device, ChipError::StorageType err) +void CloseSessionCallback(DeviceProxy * device, ChipError::StorageType err) { if (device != nullptr) { - device->CloseSession(); + device->Disconnect(); } if (!ChipError::IsSuccess(err)) { @@ -390,7 +390,8 @@ ChipError::StorageType pychip_DeviceController_OpenCommissioningWindow(chip::Con chip::NodeId nodeid, uint16_t timeout, uint16_t iteration, uint16_t discriminator, uint8_t option) { - return devCtrl->OpenCommissioningWindow(nodeid, timeout, iteration, discriminator, option).AsInteger(); + SetupPayload payload; + return devCtrl->OpenCommissioningWindow(nodeid, timeout, iteration, discriminator, option, payload).AsInteger(); } void pychip_DeviceController_PrintDiscoveredDevices(chip::Controller::DeviceCommissioner * devCtrl) @@ -530,7 +531,7 @@ struct GetDeviceCallbacks mOnSuccess(OnDeviceConnectedFn, this), mOnFailure(OnConnectionFailureFn, this), mCallback(callback) {} - static void OnDeviceConnectedFn(void * context, Device * device) + static void OnDeviceConnectedFn(void * context, DeviceProxy * device) { auto * self = static_cast(context); self->mCallback(device, CHIP_NO_ERROR.AsInteger()); @@ -567,7 +568,7 @@ ChipError::StorageType pychip_DeviceCommissioner_CloseBleConnection(chip::Contro #endif } -uint64_t pychip_GetCommandSenderHandle(chip::Controller::Device * device) +uint64_t pychip_GetCommandSenderHandle(chip::DeviceProxy * device) { return 0; } diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index 07bb2fd3a1e11c..5d5d36eb9d97cb 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -1776,7 +1776,7 @@ void chip_ime_SetFailureResponseDelegate(FailureResponseDelegate delegate) // Cluster AccountLogin -chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_GetSetupPIN(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_GetSetupPIN(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * tempAccountIdentifier, uint32_t tempAccountIdentifier_Len) @@ -1789,9 +1789,8 @@ chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_GetSetupPIN(chi chip::CharSpan(reinterpret_cast(tempAccountIdentifier), tempAccountIdentifier_Len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_Login(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - const uint8_t * tempAccountIdentifier, +chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_Login(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, const uint8_t * tempAccountIdentifier, uint32_t tempAccountIdentifier_Len, const uint8_t * setupPIN, uint32_t setupPIN_Len) { @@ -1804,7 +1803,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_Login(chip::Con .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_AccountLogin_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_AccountLogin_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1818,7 +1817,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_AccountLogin_ClusterRevision // Cluster AdministratorCommissioning chip::ChipError::StorageType chip_ime_AppendCommand_AdministratorCommissioning_OpenBasicCommissioningWindow( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t commissioningTimeout) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t commissioningTimeout) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::AdministratorCommissioningCluster cluster; @@ -1826,7 +1825,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_AdministratorCommissioning_O return cluster.OpenBasicCommissioningWindow(nullptr, nullptr, commissioningTimeout).AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_AdministratorCommissioning_OpenCommissioningWindow( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t commissioningTimeout, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t commissioningTimeout, const uint8_t * PAKEVerifier, uint32_t PAKEVerifier_Len, uint16_t discriminator, uint32_t iterations, const uint8_t * salt, uint32_t salt_Len, uint16_t passcodeID) { @@ -1838,9 +1837,9 @@ chip::ChipError::StorageType chip_ime_AppendCommand_AdministratorCommissioning_O discriminator, iterations, chip::ByteSpan(salt, salt_Len), passcodeID) .AsInteger(); } -chip::ChipError::StorageType -chip_ime_AppendCommand_AdministratorCommissioning_RevokeCommissioning(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId) +chip::ChipError::StorageType chip_ime_AppendCommand_AdministratorCommissioning_RevokeCommissioning(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::AdministratorCommissioningCluster cluster; @@ -1848,7 +1847,7 @@ chip_ime_AppendCommand_AdministratorCommissioning_RevokeCommissioning(chip::Cont return cluster.RevokeCommissioning(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1861,7 +1860,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_AdministratorCommissioning_C // End of Cluster AdministratorCommissioning // Cluster ApplicationBasic -chip::ChipError::StorageType chip_ime_AppendCommand_ApplicationBasic_ChangeStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ApplicationBasic_ChangeStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t status) { @@ -1871,7 +1870,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ApplicationBasic_ChangeStatu return cluster.ChangeStatus(nullptr, nullptr, status).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1881,7 +1880,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorName( return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1891,7 +1890,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorId(ch return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1902,7 +1901,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_Application .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1912,7 +1911,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ProductId(c return cluster.ReadAttributeProductId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1922,7 +1921,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_Application return cluster.ReadAttributeApplicationId(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1932,7 +1931,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_CatalogVend return cluster.ReadAttributeCatalogVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1942,7 +1941,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_Application return cluster.ReadAttributeApplicationStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1955,9 +1954,10 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ClusterRevi // End of Cluster ApplicationBasic // Cluster ApplicationLauncher -chip::ChipError::StorageType chip_ime_AppendCommand_ApplicationLauncher_LaunchApp( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * data, uint32_t data_Len, - uint16_t catalogVendorId, const uint8_t * applicationId, uint32_t applicationId_Len) +chip::ChipError::StorageType +chip_ime_AppendCommand_ApplicationLauncher_LaunchApp(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, + const uint8_t * data, uint32_t data_Len, uint16_t catalogVendorId, + const uint8_t * applicationId, uint32_t applicationId_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ApplicationLauncherCluster cluster; @@ -1968,7 +1968,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ApplicationLauncher_LaunchAp .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1981,7 +1981,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_Applicat .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -1991,7 +1991,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_CatalogV return cluster.ReadAttributeCatalogVendorId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2001,7 +2001,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_Applicat return cluster.ReadAttributeApplicationId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2014,7 +2014,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ClusterR // End of Cluster ApplicationLauncher // Cluster AudioOutput -chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_RenameOutput(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_RenameOutput(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t index, const uint8_t * name, uint32_t name_Len) { @@ -2024,7 +2024,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_RenameOutput(chi return cluster.RenameOutput(nullptr, nullptr, index, chip::CharSpan(reinterpret_cast(name), name_Len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_SelectOutput(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_SelectOutput(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t index) { @@ -2034,7 +2034,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_SelectOutput(chi return cluster.SelectOutput(nullptr, nullptr, index).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_AudioOutputList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_AudioOutputList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2046,7 +2046,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_AudioOutputList( .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2056,7 +2056,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutp return cluster.ReadAttributeCurrentAudioOutput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2069,7 +2069,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_ClusterRevision( // End of Cluster AudioOutput // Cluster BarrierControl -chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t percentOpen) { @@ -2078,7 +2078,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierContro cluster.Associate(device, ZCLendpointId); return cluster.BarrierControlGoToPercent(nullptr, nullptr, percentOpen).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierControlStop(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierControlStop(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2087,7 +2087,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierContro return cluster.BarrierControlStop(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2097,7 +2097,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierMoving return cluster.ReadAttributeBarrierMovingState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2108,7 +2108,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierSafety .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2118,7 +2118,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierCapabi return cluster.ReadAttributeBarrierCapabilities(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2128,7 +2128,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierPositi return cluster.ReadAttributeBarrierPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2141,7 +2141,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_ClusterRevisi // End of Cluster BarrierControl // Cluster Basic -chip::ChipError::StorageType chip_ime_AppendCommand_Basic_MfgSpecificPing(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Basic_MfgSpecificPing(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2150,7 +2150,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Basic_MfgSpecificPing(chip:: return cluster.MfgSpecificPing(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2161,8 +2161,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_InteractionModelVersio .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorName(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2170,8 +2170,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorName(chip::Contr return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorID(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2179,8 +2179,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorID(chip::Control return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductName(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2189,8 +2188,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductName(chip::Cont return cluster.ReadAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductID(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2198,8 +2197,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductID(chip::Contro return cluster.ReadAttributeProductID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_UserLabel(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_UserLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2207,9 +2206,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_UserLabel(chip::Contro return cluster.ReadAttributeUserLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_UserLabel(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, - size_t len) +chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_UserLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t * value, size_t len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2219,8 +2217,8 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_UserLabel(chip::Contr chip::CharSpan(reinterpret_cast(value), len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Location(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Location(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2228,9 +2226,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Location(chip::Control return cluster.ReadAttributeLocation(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_Location(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, - size_t len) +chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_Location(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t * value, size_t len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2240,7 +2237,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_Location(chip::Contro chip::CharSpan(reinterpret_cast(value), len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2250,7 +2247,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersion(chip:: return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2261,7 +2258,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersionString( .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2271,7 +2268,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersion(chip:: return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2282,7 +2279,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersionString( .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ManufacturingDate(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ManufacturingDate(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2293,8 +2290,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ManufacturingDate(chip .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_PartNumber(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_PartNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2302,8 +2299,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_PartNumber(chip::Contr return cluster.ReadAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductURL(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductURL(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2311,8 +2308,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductURL(chip::Contr return cluster.ReadAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductLabel(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2321,8 +2317,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductLabel(chip::Con return cluster.ReadAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SerialNumber(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SerialNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2331,7 +2326,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SerialNumber(chip::Con return cluster.ReadAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_LocalConfigDisabled(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_LocalConfigDisabled(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2342,7 +2337,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_LocalConfigDisabled(ch .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_LocalConfigDisabled(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_LocalConfigDisabled(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, bool value) { @@ -2352,8 +2347,8 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_LocalConfigDisabled(c return cluster.WriteAttributeLocalConfigDisabled(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Reachable(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Reachable(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::BasicCluster cluster; @@ -2361,7 +2356,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Reachable(chip::Contro return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2374,7 +2369,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ClusterRevision(chip:: // End of Cluster Basic // Cluster BinaryInputBasic -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_OutOfService(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_OutOfService(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2384,7 +2379,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_OutOfServic return cluster.ReadAttributeOutOfService(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_OutOfService(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_OutOfService(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, bool value) { @@ -2394,7 +2389,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_OutOfServi return cluster.WriteAttributeOutOfService(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_PresentValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_PresentValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2404,7 +2399,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_PresentValu return cluster.ReadAttributePresentValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_PresentValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_PresentValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -2417,7 +2412,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_Presen .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_PresentValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_PresentValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, bool value) { @@ -2427,7 +2422,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_PresentVal return cluster.WriteAttributePresentValue(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2437,7 +2432,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags return cluster.ReadAttributeStatusFlags(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_StatusFlags(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_StatusFlags(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -2449,7 +2444,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_Status .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2462,7 +2457,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevi // End of Cluster BinaryInputBasic // Cluster Binding -chip::ChipError::StorageType chip_ime_AppendCommand_Binding_Bind(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_AppendCommand_Binding_Bind(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, chip::NodeId nodeId, chip::GroupId groupId, chip::EndpointId endpointId, chip::ClusterId clusterId) { @@ -2471,9 +2466,8 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Binding_Bind(chip::Controlle cluster.Associate(device, ZCLendpointId); return cluster.Bind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Binding_Unbind(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - chip::NodeId nodeId, chip::GroupId groupId, +chip::ChipError::StorageType chip_ime_AppendCommand_Binding_Unbind(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, chip::NodeId nodeId, chip::GroupId groupId, chip::EndpointId endpointId, chip::ClusterId clusterId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2482,7 +2476,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Binding_Unbind(chip::Control return cluster.Unbind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Binding_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Binding_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2495,7 +2489,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Binding_ClusterRevision(chip // End of Cluster Binding // Cluster BooleanState -chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_StateValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_StateValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2505,7 +2499,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_StateValue(chip return cluster.ReadAttributeStateValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BooleanState_StateValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_BooleanState_StateValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -2518,7 +2512,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_BooleanState_StateValue .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2531,7 +2525,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_ClusterRevision // End of Cluster BooleanState // Cluster BridgedActions -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableAction(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableAction(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID) { @@ -2540,7 +2534,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableAction cluster.Associate(device, ZCLendpointId); return cluster.DisableAction(nullptr, nullptr, actionID, invokeID).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableActionWithDuration(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableActionWithDuration(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID, uint32_t duration) @@ -2550,7 +2544,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_DisableAction cluster.Associate(device, ZCLendpointId); return cluster.DisableActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableAction(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableAction(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID) { @@ -2559,7 +2553,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableAction( cluster.Associate(device, ZCLendpointId); return cluster.EnableAction(nullptr, nullptr, actionID, invokeID).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableActionWithDuration(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableActionWithDuration(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID, uint32_t duration) @@ -2569,7 +2563,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_EnableActionW cluster.Associate(device, ZCLendpointId); return cluster.EnableActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantAction(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantAction(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID) { @@ -2578,7 +2572,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantAction cluster.Associate(device, ZCLendpointId); return cluster.InstantAction(nullptr, nullptr, actionID, invokeID).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantActionWithTransition(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantActionWithTransition(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID, @@ -2589,7 +2583,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_InstantAction cluster.Associate(device, ZCLendpointId); return cluster.InstantActionWithTransition(nullptr, nullptr, actionID, invokeID, transitionTime).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseAction(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseAction(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID) { @@ -2598,7 +2592,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseAction(c cluster.Associate(device, ZCLendpointId); return cluster.PauseAction(nullptr, nullptr, actionID, invokeID).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseActionWithDuration(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseActionWithDuration(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID, uint32_t duration) @@ -2608,7 +2602,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_PauseActionWi cluster.Associate(device, ZCLendpointId); return cluster.PauseActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_ResumeAction(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_ResumeAction(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID) { @@ -2617,7 +2611,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_ResumeAction( cluster.Associate(device, ZCLendpointId); return cluster.ResumeAction(nullptr, nullptr, actionID, invokeID).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartAction(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartAction(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID) { @@ -2626,7 +2620,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartAction(c cluster.Associate(device, ZCLendpointId); return cluster.StartAction(nullptr, nullptr, actionID, invokeID).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartActionWithDuration(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartActionWithDuration(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID, uint32_t duration) @@ -2636,7 +2630,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StartActionWi cluster.Associate(device, ZCLendpointId); return cluster.StartActionWithDuration(nullptr, nullptr, actionID, invokeID, duration).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StopAction(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StopAction(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t actionID, uint32_t invokeID) { @@ -2646,7 +2640,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_BridgedActions_StopAction(ch return cluster.StopAction(nullptr, nullptr, actionID, invokeID).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ActionList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ActionList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2658,7 +2652,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ActionList(ch .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_EndpointList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_EndpointList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2670,7 +2664,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_EndpointList( .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_SetupUrl(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_SetupUrl(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2680,7 +2674,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_SetupUrl(chip return cluster.ReadAttributeSetupUrl(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2693,7 +2687,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ClusterRevisi // End of Cluster BridgedActions // Cluster BridgedDeviceBasic -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2703,7 +2697,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorNam return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2713,7 +2707,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID( return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2723,7 +2717,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductNa return cluster.ReadAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2733,7 +2727,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel return cluster.ReadAttributeUserLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_BridgedDeviceBasic_UserLabel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_BridgedDeviceBasic_UserLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, size_t len) { @@ -2745,7 +2739,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_BridgedDeviceBasic_UserLabe chip::CharSpan(reinterpret_cast(value), len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2755,7 +2749,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareV return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2766,7 +2760,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareV .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2776,7 +2770,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareV return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2787,7 +2781,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareV .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2798,7 +2792,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_Manufactu .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2808,7 +2802,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumbe return cluster.ReadAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2818,7 +2812,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductUR return cluster.ReadAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2828,7 +2822,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLa return cluster.ReadAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2838,7 +2832,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNum return cluster.ReadAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2848,7 +2842,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -2861,7 +2855,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRe // End of Cluster BridgedDeviceBasic // Cluster ColorControl -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_ColorLoopSet(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_ColorLoopSet(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t updateFlags, uint8_t action, uint8_t direction, uint16_t time, uint16_t startHue, @@ -2873,7 +2867,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_ColorLoopSet(ch return cluster.ColorLoopSet(nullptr, nullptr, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t moveMode, uint16_t rate, uint8_t optionsMask, uint8_t optionsOverride) @@ -2883,7 +2877,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveHue cluster.Associate(device, ZCLendpointId); return cluster.EnhancedMoveHue(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveToHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveToHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t enhancedHue, uint8_t direction, uint16_t transitionTime, uint8_t optionsMask, @@ -2896,7 +2890,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveToH .AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveToHueAndSaturation( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t enhancedHue, uint8_t saturation, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t enhancedHue, uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2906,7 +2900,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveToH .EnhancedMoveToHueAndSaturation(nullptr, nullptr, enhancedHue, saturation, transitionTime, optionsMask, optionsOverride) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedStepHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedStepHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t stepMode, uint16_t stepSize, uint16_t transitionTime, uint8_t optionsMask, @@ -2917,7 +2911,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedStepHue cluster.Associate(device, ZCLendpointId); return cluster.EnhancedStepHue(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveColor(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveColor(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t rateX, int16_t rateY, uint8_t optionsMask, uint8_t optionsOverride) @@ -2928,7 +2922,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveColor(chip: return cluster.MoveColor(nullptr, nullptr, rateX, rateY, optionsMask, optionsOverride).AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveColorTemperature( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t moveMode, uint16_t rate, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t moveMode, uint16_t rate, uint16_t colorTemperatureMinimum, uint16_t colorTemperatureMaximum, uint8_t optionsMask, uint8_t optionsOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -2939,17 +2933,16 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveColorTemper optionsOverride) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveHue(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t moveMode, uint8_t rate, uint8_t optionsMask, - uint8_t optionsOverride) +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t moveMode, uint8_t rate, + uint8_t optionsMask, uint8_t optionsOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ColorControlCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.MoveHue(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveSaturation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveSaturation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, uint8_t optionsOverride) @@ -2959,7 +2952,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveSaturation( cluster.Associate(device, ZCLendpointId); return cluster.MoveSaturation(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToColor(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToColor(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t colorX, uint16_t colorY, uint16_t transitionTime, uint8_t optionsMask, @@ -2971,7 +2964,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToColor(chi return cluster.MoveToColor(nullptr, nullptr, colorX, colorY, transitionTime, optionsMask, optionsOverride).AsInteger(); } chip::ChipError::StorageType -chip_ime_AppendCommand_ColorControl_MoveToColorTemperature(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip_ime_AppendCommand_ColorControl_MoveToColorTemperature(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t colorTemperature, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { @@ -2981,7 +2974,7 @@ chip_ime_AppendCommand_ColorControl_MoveToColorTemperature(chip::Controller::Dev return cluster.MoveToColorTemperature(nullptr, nullptr, colorTemperature, transitionTime, optionsMask, optionsOverride) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t hue, uint8_t direction, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) @@ -2992,7 +2985,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToHue(chip: return cluster.MoveToHue(nullptr, nullptr, hue, direction, transitionTime, optionsMask, optionsOverride).AsInteger(); } chip::ChipError::StorageType -chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t hue, uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) { @@ -3002,7 +2995,7 @@ chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation(chip::Controller::Dev return cluster.MoveToHueAndSaturation(nullptr, nullptr, hue, saturation, transitionTime, optionsMask, optionsOverride) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToSaturation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToSaturation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) @@ -3012,7 +3005,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_MoveToSaturatio cluster.Associate(device, ZCLendpointId); return cluster.MoveToSaturation(nullptr, nullptr, saturation, transitionTime, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepColor(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepColor(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t stepX, int16_t stepY, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) @@ -3022,10 +3015,11 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepColor(chip: cluster.Associate(device, ZCLendpointId); return cluster.StepColor(nullptr, nullptr, stepX, stepY, transitionTime, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepColorTemperature( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t stepMode, uint16_t stepSize, - uint16_t transitionTime, uint16_t colorTemperatureMinimum, uint16_t colorTemperatureMaximum, uint8_t optionsMask, - uint8_t optionsOverride) +chip::ChipError::StorageType +chip_ime_AppendCommand_ColorControl_StepColorTemperature(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, + uint8_t stepMode, uint16_t stepSize, uint16_t transitionTime, + uint16_t colorTemperatureMinimum, uint16_t colorTemperatureMaximum, + uint8_t optionsMask, uint8_t optionsOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ColorControlCluster cluster; @@ -3035,17 +3029,17 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepColorTemper colorTemperatureMaximum, optionsMask, optionsOverride) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepHue(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t stepMode, uint8_t stepSize, uint8_t transitionTime, - uint8_t optionsMask, uint8_t optionsOverride) +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t stepMode, uint8_t stepSize, + uint8_t transitionTime, uint8_t optionsMask, + uint8_t optionsOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ColorControlCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.StepHue(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepSaturation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepSaturation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t stepMode, uint8_t stepSize, uint8_t transitionTime, uint8_t optionsMask, @@ -3056,7 +3050,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepSaturation( cluster.Associate(device, ZCLendpointId); return cluster.StepSaturation(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StopMoveStep(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StopMoveStep(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t optionsMask, uint8_t optionsOverride) { @@ -3066,7 +3060,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StopMoveStep(ch return cluster.StopMoveStep(nullptr, nullptr, optionsMask, optionsOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3076,7 +3070,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentHue(chip return cluster.ReadAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -3088,7 +3082,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentHue .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3098,7 +3092,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentSaturati return cluster.ReadAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentSaturation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentSaturation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -3111,7 +3105,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentSat .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3121,7 +3115,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_RemainingTime(c return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3131,7 +3125,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentX(chip:: return cluster.ReadAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -3143,7 +3137,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentX(c .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3153,7 +3147,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentY(chip:: return cluster.ReadAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -3165,7 +3159,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentY(c .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3175,7 +3169,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_DriftCompensati return cluster.ReadAttributeDriftCompensation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CompensationText(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CompensationText(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3186,7 +3180,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CompensationTex .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3196,7 +3190,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTemperatur return cluster.ReadAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTemperature(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTemperature(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -3209,7 +3203,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTempe .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3219,7 +3213,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorMode(chip: return cluster.ReadAttributeColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3229,7 +3223,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorControlOpt return cluster.ReadAttributeColorControlOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorControlOptions(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorControlOptions(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -3239,7 +3233,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorControlOp return cluster.WriteAttributeColorControlOptions(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3249,7 +3243,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_NumberOfPrimari return cluster.ReadAttributeNumberOfPrimaries(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1X(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1X(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3259,7 +3253,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1X(chip: return cluster.ReadAttributePrimary1X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3269,7 +3263,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Y(chip: return cluster.ReadAttributePrimary1Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3279,7 +3273,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Intensi return cluster.ReadAttributePrimary1Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2X(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2X(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3289,7 +3283,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2X(chip: return cluster.ReadAttributePrimary2X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3299,7 +3293,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Y(chip: return cluster.ReadAttributePrimary2Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3309,7 +3303,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Intensi return cluster.ReadAttributePrimary2Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3X(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3X(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3319,7 +3313,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3X(chip: return cluster.ReadAttributePrimary3X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3329,7 +3323,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Y(chip: return cluster.ReadAttributePrimary3Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3339,7 +3333,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Intensi return cluster.ReadAttributePrimary3Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4X(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4X(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3349,7 +3343,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4X(chip: return cluster.ReadAttributePrimary4X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3359,7 +3353,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Y(chip: return cluster.ReadAttributePrimary4Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3369,7 +3363,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Intensi return cluster.ReadAttributePrimary4Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5X(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5X(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3379,7 +3373,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5X(chip: return cluster.ReadAttributePrimary5X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3389,7 +3383,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Y(chip: return cluster.ReadAttributePrimary5Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3399,7 +3393,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Intensi return cluster.ReadAttributePrimary5Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6X(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6X(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3409,7 +3403,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6X(chip: return cluster.ReadAttributePrimary6X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3419,7 +3413,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Y(chip: return cluster.ReadAttributePrimary6Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3429,7 +3423,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Intensi return cluster.ReadAttributePrimary6Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3439,7 +3433,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointX(chi return cluster.ReadAttributeWhitePointX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3448,7 +3442,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointX(ch cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeWhitePointX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3458,7 +3452,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointY(chi return cluster.ReadAttributeWhitePointY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3467,7 +3461,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointY(ch cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeWhitePointY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3477,7 +3471,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRX(ch return cluster.ReadAttributeColorPointRX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3487,7 +3481,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRX(c return cluster.WriteAttributeColorPointRX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3497,7 +3491,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRY(ch return cluster.ReadAttributeColorPointRY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3507,7 +3501,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRY(c return cluster.WriteAttributeColorPointRY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3518,7 +3512,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRInte .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRIntensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRIntensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -3528,7 +3522,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRInt return cluster.WriteAttributeColorPointRIntensity(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3538,7 +3532,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGX(ch return cluster.ReadAttributeColorPointGX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3548,7 +3542,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGX(c return cluster.WriteAttributeColorPointGX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3558,7 +3552,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGY(ch return cluster.ReadAttributeColorPointGY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3568,7 +3562,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGY(c return cluster.WriteAttributeColorPointGY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3579,7 +3573,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGInte .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGIntensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGIntensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -3589,7 +3583,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGInt return cluster.WriteAttributeColorPointGIntensity(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3599,7 +3593,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBX(ch return cluster.ReadAttributeColorPointBX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBX(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBX(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3609,7 +3603,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBX(c return cluster.WriteAttributeColorPointBX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3619,7 +3613,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBY(ch return cluster.ReadAttributeColorPointBY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBY(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBY(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3629,7 +3623,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBY(c return cluster.WriteAttributeColorPointBY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3640,7 +3634,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBInte .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBIntensity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBIntensity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -3650,7 +3644,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBInt return cluster.WriteAttributeColorPointBIntensity(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3660,7 +3654,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedCurrent return cluster.ReadAttributeEnhancedCurrentHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3670,7 +3664,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedColorMo return cluster.ReadAttributeEnhancedColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3680,7 +3674,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopActive return cluster.ReadAttributeColorLoopActive(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3690,7 +3684,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopDirect return cluster.ReadAttributeColorLoopDirection(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3700,7 +3694,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopTime(c return cluster.ReadAttributeColorLoopTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3711,7 +3705,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStartE .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3722,7 +3716,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStored .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3732,7 +3726,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorCapabiliti return cluster.ReadAttributeColorCapabilities(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3743,7 +3737,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysic .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3754,7 +3748,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysic .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3765,7 +3759,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CoupleColorTemp .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3776,7 +3770,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_StartUpColorTem .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_StartUpColorTemperatureMireds(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_StartUpColorTemperatureMireds(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -3787,7 +3781,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_StartUpColorTe .WriteAttributeStartUpColorTemperatureMireds(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3800,7 +3794,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ClusterRevision // End of Cluster ColorControl // Cluster ContentLauncher -chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchContent(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchContent(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, bool autoPlay, const uint8_t * data, uint32_t data_Len) @@ -3811,7 +3805,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchConten return cluster.LaunchContent(nullptr, nullptr, autoPlay, chip::CharSpan(reinterpret_cast(data), data_Len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchURL(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchURL(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * contentURL, uint32_t contentURL_Len, const uint8_t * displayString, @@ -3826,7 +3820,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchURL(ch .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3839,7 +3833,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_AcceptsHeade .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3852,7 +3846,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_SupportedStr .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3865,7 +3859,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_ClusterRevis // End of Cluster ContentLauncher // Cluster Descriptor -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_DeviceList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_DeviceList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3876,7 +3870,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_DeviceList(chip:: .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ServerList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ServerList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3887,7 +3881,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ServerList(chip:: .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClientList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClientList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3898,8 +3892,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClientList(chip:: .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_PartsList(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_PartsList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -3909,7 +3902,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_PartsList(chip::C .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -3923,7 +3916,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClusterRevision(c // Cluster DiagnosticLogs chip::ChipError::StorageType chip_ime_AppendCommand_DiagnosticLogs_RetrieveLogsRequest( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t intent, uint8_t requestedProtocol, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t intent, uint8_t requestedProtocol, const uint8_t * transferFileDesignator, uint32_t transferFileDesignator_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -3938,7 +3931,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DiagnosticLogs_RetrieveLogsR // End of Cluster DiagnosticLogs // Cluster DoorLock -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllPins(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllPins(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -3946,7 +3939,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllPins(chip:: cluster.Associate(device, ZCLendpointId); return cluster.ClearAllPins(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllRfids(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllRfids(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -3954,7 +3947,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllRfids(chip: cluster.Associate(device, ZCLendpointId); return cluster.ClearAllRfids(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId) { @@ -3963,25 +3956,23 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearHolidaySchedul cluster.Associate(device, ZCLendpointId); return cluster.ClearHolidaySchedule(nullptr, nullptr, scheduleId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearPin(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t userId) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearPin(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.ClearPin(nullptr, nullptr, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearRfid(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t userId) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearRfid(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.ClearRfid(nullptr, nullptr, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId, uint16_t userId) { @@ -3990,7 +3981,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedul cluster.Associate(device, ZCLendpointId); return cluster.ClearWeekdaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearYeardaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearYeardaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId, uint16_t userId) { @@ -3999,7 +3990,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearYeardaySchedul cluster.Associate(device, ZCLendpointId); return cluster.ClearYeardaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetHolidaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetHolidaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId) { @@ -4008,7 +3999,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetHolidaySchedule( cluster.Associate(device, ZCLendpointId); return cluster.GetHolidaySchedule(nullptr, nullptr, scheduleId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetLogRecord(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetLogRecord(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t logIndex) { @@ -4017,32 +4008,31 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetLogRecord(chip:: cluster.Associate(device, ZCLendpointId); return cluster.GetLogRecord(nullptr, nullptr, logIndex).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetPin(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t userId) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetPin(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.GetPin(nullptr, nullptr, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetRfid(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t userId) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetRfid(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.GetRfid(nullptr, nullptr, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetUserType(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t userId) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetUserType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.GetUserType(nullptr, nullptr, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId, uint16_t userId) { @@ -4051,7 +4041,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule( cluster.Associate(device, ZCLendpointId); return cluster.GetWeekdaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetYeardaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetYeardaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId, uint16_t userId) { @@ -4060,16 +4050,15 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetYeardaySchedule( cluster.Associate(device, ZCLendpointId); return cluster.GetYeardaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_LockDoor(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - const uint8_t * pin, uint32_t pin_Len) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_LockDoor(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, const uint8_t * pin, uint32_t pin_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.LockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetHolidaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetHolidaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId, uint32_t localStartTime, uint32_t localEndTime, @@ -4081,29 +4070,26 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetHolidaySchedule( return cluster.SetHolidaySchedule(nullptr, nullptr, scheduleId, localStartTime, localEndTime, operatingModeDuringHoliday) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetPin(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t userId, - uint8_t userStatus, uint8_t userType, const uint8_t * pin, - uint32_t pin_Len) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetPin(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId, uint8_t userStatus, + uint8_t userType, const uint8_t * pin, uint32_t pin_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.SetPin(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(pin, pin_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetRfid(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t userId, - uint8_t userStatus, uint8_t userType, const uint8_t * id, - uint32_t id_Len) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetRfid(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId, uint8_t userStatus, + uint8_t userType, const uint8_t * id, uint32_t id_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.SetRfid(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(id, id_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetUserType(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t userId, uint8_t userType) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetUserType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t userId, uint8_t userType) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; @@ -4111,7 +4097,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetUserType(chip::C return cluster.SetUserType(nullptr, nullptr, userId, userType).AsInteger(); } chip::ChipError::StorageType -chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, +chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId, uint16_t userId, uint8_t daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute) { @@ -4121,7 +4107,7 @@ chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule(chip::Controller::Device * de return cluster.SetWeekdaySchedule(nullptr, nullptr, scheduleId, userId, daysMask, startHour, startMinute, endHour, endMinute) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetYeardaySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetYeardaySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t scheduleId, uint16_t userId, uint32_t localStartTime, uint32_t localEndTime) @@ -4131,16 +4117,15 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_SetYeardaySchedule( cluster.Associate(device, ZCLendpointId); return cluster.SetYeardaySchedule(nullptr, nullptr, scheduleId, userId, localStartTime, localEndTime).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_UnlockDoor(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - const uint8_t * pin, uint32_t pin_Len) +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_UnlockDoor(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, const uint8_t * pin, uint32_t pin_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::DoorLockCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.UnlockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_UnlockWithTimeout(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_UnlockWithTimeout(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t timeoutInSeconds, const uint8_t * pin, uint32_t pin_Len) @@ -4151,8 +4136,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_UnlockWithTimeout(c return cluster.UnlockWithTimeout(nullptr, nullptr, timeoutInSeconds, chip::ByteSpan(pin, pin_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockState(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockState(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -4161,7 +4145,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockState(chip::Con return cluster.ReadAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_LockState(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_LockState(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -4173,8 +4157,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_LockState(chip .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockType(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -4183,7 +4166,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockType(chip::Cont return cluster.ReadAttributeLockType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4193,7 +4176,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chi return cluster.ReadAttributeActuatorEnabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4206,7 +4189,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ClusterRevision(chi // End of Cluster DoorLock // Cluster ElectricalMeasurement -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4216,7 +4199,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_Measur return cluster.ReadAttributeMeasurementType(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4226,7 +4209,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_TotalA return cluster.ReadAttributeTotalActivePower(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4236,7 +4219,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVol return cluster.ReadAttributeRmsVoltage(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4246,7 +4229,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVol return cluster.ReadAttributeRmsVoltageMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4256,7 +4239,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVol return cluster.ReadAttributeRmsVoltageMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4266,7 +4249,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCur return cluster.ReadAttributeRmsCurrent(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4276,7 +4259,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCur return cluster.ReadAttributeRmsCurrentMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4286,7 +4269,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCur return cluster.ReadAttributeRmsCurrentMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4296,7 +4279,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_Active return cluster.ReadAttributeActivePower(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4306,7 +4289,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_Active return cluster.ReadAttributeActivePowerMin(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4316,7 +4299,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_Active return cluster.ReadAttributeActivePowerMax(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4329,7 +4312,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_Cluste // End of Cluster ElectricalMeasurement // Cluster EthernetNetworkDiagnostics -chip::ChipError::StorageType chip_ime_AppendCommand_EthernetNetworkDiagnostics_ResetCounts(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_EthernetNetworkDiagnostics_ResetCounts(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { @@ -4339,7 +4322,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_EthernetNetworkDiagnostics_R return cluster.ResetCounts(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PHYRate(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PHYRate(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4349,7 +4332,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_P return cluster.ReadAttributePHYRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FullDuplex(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FullDuplex(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4359,7 +4342,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_F return cluster.ReadAttributeFullDuplex(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4369,7 +4352,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_P return cluster.ReadAttributePacketRxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4379,7 +4362,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_P return cluster.ReadAttributePacketTxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4389,7 +4372,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_T return cluster.ReadAttributeTxErrCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4399,7 +4382,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_C return cluster.ReadAttributeCollisionCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4409,7 +4392,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_O return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CarrierDetect(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CarrierDetect(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4419,7 +4402,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_C return cluster.ReadAttributeCarrierDetect(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TimeSinceReset(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TimeSinceReset(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4429,7 +4412,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_T return cluster.ReadAttributeTimeSinceReset(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4442,8 +4425,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_C // End of Cluster EthernetNetworkDiagnostics // Cluster FixedLabel -chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_LabelList(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_LabelList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -4453,7 +4435,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_LabelList(chip::C .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4466,7 +4448,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_ClusterRevision(c // End of Cluster FixedLabel // Cluster FlowMeasurement -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4476,7 +4458,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MeasuredValu return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4486,7 +4468,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredV return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4496,7 +4478,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredV return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_Tolerance(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_Tolerance(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4506,7 +4488,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_Tolerance(ch return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4519,7 +4501,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_ClusterRevis // End of Cluster FlowMeasurement // Cluster GeneralCommissioning -chip::ChipError::StorageType chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t expiryLengthSeconds, uint64_t breadcrumb, uint32_t timeoutMs) @@ -4529,7 +4511,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_GeneralCommissioning_ArmFail cluster.Associate(device, ZCLendpointId); return cluster.ArmFailSafe(nullptr, nullptr, expiryLengthSeconds, breadcrumb, timeoutMs).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { @@ -4539,7 +4521,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_GeneralCommissioning_Commiss return cluster.CommissioningComplete(nullptr, nullptr).AsInteger(); } chip::ChipError::StorageType -chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t location, const uint8_t * countryCode, uint32_t countryCode_Len, uint64_t breadcrumb, uint32_t timeoutMs) { @@ -4552,7 +4534,7 @@ chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig(chip::Controller .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4562,7 +4544,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_Breadcr return cluster.ReadAttributeBreadcrumb(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_GeneralCommissioning_Breadcrumb(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_GeneralCommissioning_Breadcrumb(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint64_t value) { @@ -4571,8 +4553,9 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_GeneralCommissioning_Breadc cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeBreadcrumb(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::GeneralCommissioningCluster cluster; @@ -4583,7 +4566,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_BasicCo .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4596,7 +4579,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_Cluster // End of Cluster GeneralCommissioning // Cluster GeneralDiagnostics -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4609,7 +4592,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_NetworkIn .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4619,7 +4602,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_RebootCou return cluster.ReadAttributeRebootCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_UpTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_UpTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4629,7 +4612,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_UpTime(ch return cluster.ReadAttributeUpTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_TotalOperationalHours(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_TotalOperationalHours(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4640,7 +4623,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_TotalOper .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_BootReasons(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_BootReasons(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4650,7 +4633,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_BootReaso return cluster.ReadAttributeBootReasons(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4663,7 +4646,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRe // End of Cluster GeneralDiagnostics // Cluster GroupKeyManagement -chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_Groups(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_Groups(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4674,7 +4657,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_Groups(ch .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4686,7 +4669,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4699,9 +4682,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_ClusterRe // End of Cluster GroupKeyManagement // Cluster Groups -chip::ChipError::StorageType chip_ime_AppendCommand_Groups_AddGroup(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t groupId, - const uint8_t * groupName, uint32_t groupName_Len) +chip::ChipError::StorageType chip_ime_AppendCommand_Groups_AddGroup(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId, const uint8_t * groupName, + uint32_t groupName_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::GroupsCluster cluster; @@ -4709,7 +4692,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Groups_AddGroup(chip::Contro return cluster.AddGroup(nullptr, nullptr, groupId, chip::CharSpan(reinterpret_cast(groupName), groupName_Len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Groups_AddGroupIfIdentifying(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Groups_AddGroupIfIdentifying(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t groupId, const uint8_t * groupName, uint32_t groupName_Len) @@ -4721,7 +4704,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Groups_AddGroupIfIdentifying .AddGroupIfIdentifying(nullptr, nullptr, groupId, chip::CharSpan(reinterpret_cast(groupName), groupName_Len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Groups_GetGroupMembership(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Groups_GetGroupMembership(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t groupCount, uint16_t groupList) { @@ -4730,7 +4713,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Groups_GetGroupMembership(ch cluster.Associate(device, ZCLendpointId); return cluster.GetGroupMembership(nullptr, nullptr, groupCount, groupList).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Groups_RemoveAllGroups(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Groups_RemoveAllGroups(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -4738,18 +4721,16 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Groups_RemoveAllGroups(chip: cluster.Associate(device, ZCLendpointId); return cluster.RemoveAllGroups(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Groups_RemoveGroup(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t groupId) +chip::ChipError::StorageType chip_ime_AppendCommand_Groups_RemoveGroup(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::GroupsCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.RemoveGroup(nullptr, nullptr, groupId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Groups_ViewGroup(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t groupId) +chip::ChipError::StorageType chip_ime_AppendCommand_Groups_ViewGroup(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::GroupsCluster cluster; @@ -4757,8 +4738,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Groups_ViewGroup(chip::Contr return cluster.ViewGroup(nullptr, nullptr, groupId).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_NameSupport(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_NameSupport(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -4767,7 +4747,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_NameSupport(chip::Con return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4780,16 +4760,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_ClusterRevision(chip: // End of Cluster Groups // Cluster Identify -chip::ChipError::StorageType chip_ime_AppendCommand_Identify_Identify(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t identifyTime) +chip::ChipError::StorageType chip_ime_AppendCommand_Identify_Identify(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t identifyTime) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::IdentifyCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.Identify(nullptr, nullptr, identifyTime).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Identify_IdentifyQuery(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Identify_IdentifyQuery(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -4797,7 +4776,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Identify_IdentifyQuery(chip: cluster.Associate(device, ZCLendpointId); return cluster.IdentifyQuery(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Identify_TriggerEffect(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Identify_TriggerEffect(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t effectIdentifier, uint8_t effectVariant) { @@ -4807,7 +4786,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Identify_TriggerEffect(chip: return cluster.TriggerEffect(nullptr, nullptr, effectIdentifier, effectVariant).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4817,7 +4796,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyTime(chip:: return cluster.ReadAttributeIdentifyTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Identify_IdentifyTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Identify_IdentifyTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -4827,7 +4806,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Identify_IdentifyTime(chip: return cluster.WriteAttributeIdentifyTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyType(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4837,7 +4816,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyType(chip:: return cluster.ReadAttributeIdentifyType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4850,7 +4829,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_ClusterRevision(chi // End of Cluster Identify // Cluster IlluminanceMeasurement -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4860,7 +4839,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Measu return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -4874,7 +4853,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_ .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MinMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MinMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4884,7 +4863,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MinMe return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4894,7 +4873,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMe return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Tolerance(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Tolerance(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4904,7 +4883,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Toler return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_LightSensorType(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_LightSensorType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4914,7 +4893,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Light return cluster.ReadAttributeLightSensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4927,9 +4906,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Clust // End of Cluster IlluminanceMeasurement // Cluster KeypadInput -chip::ChipError::StorageType chip_ime_AppendCommand_KeypadInput_SendKey(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t keyCode) +chip::ChipError::StorageType chip_ime_AppendCommand_KeypadInput_SendKey(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t keyCode) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::KeypadInputCluster cluster; @@ -4937,7 +4915,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_KeypadInput_SendKey(chip::Co return cluster.SendKey(nullptr, nullptr, keyCode).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_KeypadInput_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_KeypadInput_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -4950,17 +4928,16 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_KeypadInput_ClusterRevision( // End of Cluster KeypadInput // Cluster LevelControl -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_Move(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t moveMode, uint8_t rate, uint8_t optionMask, - uint8_t optionOverride) +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_Move(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t moveMode, uint8_t rate, + uint8_t optionMask, uint8_t optionOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::LevelControlCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.Move(nullptr, nullptr, moveMode, rate, optionMask, optionOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveToLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveToLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t level, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride) @@ -4970,7 +4947,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveToLevel(chi cluster.Associate(device, ZCLendpointId); return cluster.MoveToLevel(nullptr, nullptr, level, transitionTime, optionMask, optionOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveToLevelWithOnOff(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveToLevelWithOnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t level, uint16_t transitionTime) { @@ -4979,7 +4956,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveToLevelWith cluster.Associate(device, ZCLendpointId); return cluster.MoveToLevelWithOnOff(nullptr, nullptr, level, transitionTime).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveWithOnOff(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveWithOnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t moveMode, uint8_t rate) { @@ -4988,17 +4965,17 @@ chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_MoveWithOnOff(c cluster.Associate(device, ZCLendpointId); return cluster.MoveWithOnOff(nullptr, nullptr, moveMode, rate).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_Step(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime, - uint8_t optionMask, uint8_t optionOverride) +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_Step(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t stepMode, uint8_t stepSize, + uint16_t transitionTime, uint8_t optionMask, + uint8_t optionOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::LevelControlCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.Step(nullptr, nullptr, stepMode, stepSize, transitionTime, optionMask, optionOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_StepWithOnOff(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_StepWithOnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime) @@ -5008,16 +4985,15 @@ chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_StepWithOnOff(c cluster.Associate(device, ZCLendpointId); return cluster.StepWithOnOff(nullptr, nullptr, stepMode, stepSize, transitionTime).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_Stop(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t optionMask, uint8_t optionOverride) +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_Stop(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t optionMask, uint8_t optionOverride) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::LevelControlCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.Stop(nullptr, nullptr, optionMask, optionOverride).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_StopWithOnOff(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_StopWithOnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5026,7 +5002,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_StopWithOnOff(c return cluster.StopWithOnOff(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5036,7 +5012,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentLevel(ch return cluster.ReadAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -5049,7 +5025,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentLev .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_RemainingTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_RemainingTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5059,7 +5035,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_RemainingTime(c return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5069,7 +5045,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinLevel(chip:: return cluster.ReadAttributeMinLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5079,7 +5055,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxLevel(chip:: return cluster.ReadAttributeMaxLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentFrequency(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentFrequency(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5089,7 +5065,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentFrequenc return cluster.ReadAttributeCurrentFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinFrequency(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinFrequency(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5099,7 +5075,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinFrequency(ch return cluster.ReadAttributeMinFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxFrequency(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxFrequency(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5109,8 +5085,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxFrequency(ch return cluster.ReadAttributeMaxFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_Options(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_Options(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5119,7 +5094,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_Options(chip::C return cluster.ReadAttributeOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_Options(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_Options(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -5128,7 +5103,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_Options(chip:: cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeOptions(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5139,7 +5114,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnOffTransition .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnOffTransitionTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnOffTransitionTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -5149,8 +5124,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnOffTransitio return cluster.WriteAttributeOnOffTransitionTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnLevel(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5159,7 +5133,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnLevel(chip::C return cluster.ReadAttributeOnLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -5168,7 +5142,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnLevel(chip:: cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeOnLevel(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnTransitionTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnTransitionTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5178,7 +5152,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnTransitionTim return cluster.ReadAttributeOnTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnTransitionTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnTransitionTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -5188,7 +5162,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OnTransitionTi return cluster.WriteAttributeOnTransitionTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OffTransitionTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OffTransitionTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5198,7 +5172,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OffTransitionTi return cluster.ReadAttributeOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OffTransitionTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OffTransitionTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -5208,7 +5182,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_OffTransitionT return cluster.WriteAttributeOffTransitionTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_DefaultMoveRate(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_DefaultMoveRate(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5218,7 +5192,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_DefaultMoveRate return cluster.ReadAttributeDefaultMoveRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_DefaultMoveRate(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_DefaultMoveRate(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -5228,7 +5202,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_DefaultMoveRat return cluster.WriteAttributeDefaultMoveRate(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5238,7 +5212,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_StartUpCurrentL return cluster.ReadAttributeStartUpCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_StartUpCurrentLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_StartUpCurrentLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -5248,7 +5222,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_LevelControl_StartUpCurrent return cluster.WriteAttributeStartUpCurrentLevel(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5261,8 +5235,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_ClusterRevision // End of Cluster LevelControl // Cluster LowPower -chip::ChipError::StorageType chip_ime_AppendCommand_LowPower_Sleep(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId) +chip::ChipError::StorageType chip_ime_AppendCommand_LowPower_Sleep(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::LowPowerCluster cluster; @@ -5270,7 +5244,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_LowPower_Sleep(chip::Control return cluster.Sleep(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5283,7 +5257,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_LowPower_ClusterRevision(chi // End of Cluster LowPower // Cluster MediaInput -chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_HideInputStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_HideInputStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5291,7 +5265,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_HideInputStatus(c cluster.Associate(device, ZCLendpointId); return cluster.HideInputStatus(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_RenameInput(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_RenameInput(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t index, const uint8_t * name, uint32_t name_Len) { @@ -5300,7 +5274,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_RenameInput(chip: cluster.Associate(device, ZCLendpointId); return cluster.RenameInput(nullptr, nullptr, index, chip::CharSpan(reinterpret_cast(name), name_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_SelectInput(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_SelectInput(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t index) { @@ -5309,7 +5283,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_SelectInput(chip: cluster.Associate(device, ZCLendpointId); return cluster.SelectInput(nullptr, nullptr, index).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_ShowInputStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_ShowInputStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5318,7 +5292,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_ShowInputStatus(c return cluster.ShowInputStatus(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_MediaInputList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_MediaInputList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5330,7 +5304,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_MediaInputList(ch .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_CurrentMediaInput(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_CurrentMediaInput(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5340,7 +5314,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_CurrentMediaInput return cluster.ReadAttributeCurrentMediaInput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5353,7 +5327,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_ClusterRevision(c // End of Cluster MediaInput // Cluster MediaPlayback -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaFastForward(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaFastForward(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5361,7 +5335,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaFastForwa cluster.Associate(device, ZCLendpointId); return cluster.MediaFastForward(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaNext(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaNext(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5369,7 +5343,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaNext(chip cluster.Associate(device, ZCLendpointId); return cluster.MediaNext(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPause(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPause(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5377,7 +5351,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPause(chi cluster.Associate(device, ZCLendpointId); return cluster.MediaPause(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPlay(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPlay(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5385,7 +5359,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPlay(chip cluster.Associate(device, ZCLendpointId); return cluster.MediaPlay(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPrevious(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPrevious(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5393,7 +5367,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPrevious( cluster.Associate(device, ZCLendpointId); return cluster.MediaPrevious(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaRewind(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaRewind(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5401,7 +5375,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaRewind(ch cluster.Associate(device, ZCLendpointId); return cluster.MediaRewind(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSeek(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSeek(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint64_t position) { @@ -5410,7 +5384,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSeek(chip cluster.Associate(device, ZCLendpointId); return cluster.MediaSeek(nullptr, nullptr, position).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipBackward(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipBackward(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint64_t deltaPositionMilliseconds) { @@ -5419,7 +5393,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipBackw cluster.Associate(device, ZCLendpointId); return cluster.MediaSkipBackward(nullptr, nullptr, deltaPositionMilliseconds).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipForward(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipForward(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint64_t deltaPositionMilliseconds) { @@ -5428,7 +5402,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipForwa cluster.Associate(device, ZCLendpointId); return cluster.MediaSkipForward(nullptr, nullptr, deltaPositionMilliseconds).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStartOver(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStartOver(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5436,7 +5410,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStartOver cluster.Associate(device, ZCLendpointId); return cluster.MediaStartOver(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStop(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStop(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5445,7 +5419,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStop(chip return cluster.MediaStop(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackState(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackState(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5455,7 +5429,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackState( return cluster.ReadAttributePlaybackState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_StartTime(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_StartTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5465,7 +5439,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_StartTime(chip return cluster.ReadAttributeStartTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Duration(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Duration(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5475,7 +5449,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Duration(chip: return cluster.ReadAttributeDuration(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5485,7 +5459,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PositionUpdate return cluster.ReadAttributePositionUpdatedAt(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Position(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Position(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5495,7 +5469,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Position(chip: return cluster.ReadAttributePosition(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5505,7 +5479,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed( return cluster.ReadAttributePlaybackSpeed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5515,7 +5489,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd(c return cluster.ReadAttributeSeekRangeEnd(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5525,7 +5499,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart return cluster.ReadAttributeSeekRangeStart(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5538,7 +5512,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_ClusterRevisio // End of Cluster MediaPlayback // Cluster ModeSelect -chip::ChipError::StorageType chip_ime_AppendCommand_ModeSelect_ChangeToMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ModeSelect_ChangeToMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t newMode) { @@ -5548,7 +5522,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ModeSelect_ChangeToMode(chip return cluster.ChangeToMode(nullptr, nullptr, newMode).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_CurrentMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_CurrentMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5558,7 +5532,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_CurrentMode(chip: return cluster.ReadAttributeCurrentMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_CurrentMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_CurrentMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -5570,7 +5544,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_CurrentMode( .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_SupportedModes(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_SupportedModes(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5582,8 +5556,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_SupportedModes(ch .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_OnMode(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_OnMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5592,15 +5565,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_OnMode(chip::Cont return cluster.ReadAttributeOnMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_ModeSelect_OnMode(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_ModeSelect_OnMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ModeSelectCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeOnMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_StartUpMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_StartUpMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5610,7 +5583,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_StartUpMode(chip: return cluster.ReadAttributeStartUpMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_Description(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_Description(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5620,7 +5593,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_Description(chip: return cluster.ReadAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5634,7 +5607,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_ClusterRevision(c // Cluster NetworkCommissioning chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_AddThreadNetwork( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * operationalDataset, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * operationalDataset, uint32_t operationalDataset_Len, uint64_t breadcrumb, uint32_t timeoutMs) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5645,7 +5618,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_AddThre .AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_AddWiFiNetwork( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * ssid, uint32_t ssid_Len, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * ssid, uint32_t ssid_Len, const uint8_t * credentials, uint32_t credentials_Len, uint64_t breadcrumb, uint32_t timeoutMs) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5656,7 +5629,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_AddWiFi timeoutMs) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_DisableNetwork(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_DisableNetwork(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * networkID, uint32_t networkID_Len, uint64_t breadcrumb, @@ -5667,7 +5640,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_Disable cluster.Associate(device, ZCLendpointId); return cluster.DisableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_EnableNetwork(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_EnableNetwork(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * networkID, uint32_t networkID_Len, uint64_t breadcrumb, @@ -5678,7 +5651,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_EnableN cluster.Associate(device, ZCLendpointId); return cluster.EnableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_RemoveNetwork(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_RemoveNetwork(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * networkID, uint32_t networkID_Len, uint64_t breadcrumb, @@ -5689,7 +5662,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_RemoveN cluster.Associate(device, ZCLendpointId); return cluster.RemoveNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_ScanNetworks(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_ScanNetworks(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * ssid, uint32_t ssid_Len, uint64_t breadcrumb, uint32_t timeoutMs) @@ -5700,7 +5673,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_ScanNet return cluster.ScanNetworks(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), breadcrumb, timeoutMs).AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_UpdateThreadNetwork( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * operationalDataset, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * operationalDataset, uint32_t operationalDataset_Len, uint64_t breadcrumb, uint32_t timeoutMs) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5711,7 +5684,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_UpdateT .AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_UpdateWiFiNetwork( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * ssid, uint32_t ssid_Len, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * ssid, uint32_t ssid_Len, const uint8_t * credentials, uint32_t credentials_Len, uint64_t breadcrumb, uint32_t timeoutMs) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5723,7 +5696,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_UpdateW .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5733,7 +5706,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_Feature return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5746,18 +5719,20 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_Cluster // End of Cluster NetworkCommissioning // Cluster OtaSoftwareUpdateProvider -chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_ApplyUpdateRequest( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * updateToken, - uint32_t updateToken_Len, uint32_t newVersion) +chip::ChipError::StorageType +chip_ime_AppendCommand_OtaSoftwareUpdateProvider_ApplyUpdateRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, const uint8_t * updateToken, + uint32_t updateToken_Len, uint32_t newVersion) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OtaSoftwareUpdateProviderCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.ApplyUpdateRequest(nullptr, nullptr, chip::ByteSpan(updateToken, updateToken_Len), newVersion).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_NotifyUpdateApplied( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * updateToken, - uint32_t updateToken_Len, uint32_t softwareVersion) +chip::ChipError::StorageType +chip_ime_AppendCommand_OtaSoftwareUpdateProvider_NotifyUpdateApplied(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, const uint8_t * updateToken, + uint32_t updateToken_Len, uint32_t softwareVersion) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OtaSoftwareUpdateProviderCluster cluster; @@ -5765,7 +5740,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_No return cluster.NotifyUpdateApplied(nullptr, nullptr, chip::ByteSpan(updateToken, updateToken_Len), softwareVersion).AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_QueryImage( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, chip::VendorId vendorId, uint16_t productId, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, chip::VendorId vendorId, uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, uint16_t hardwareVersion, const uint8_t * location, uint32_t location_Len, bool requestorCanConsent, const uint8_t * metadataForProvider, uint32_t metadataForProvider_Len) { @@ -5779,7 +5754,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_Qu .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5793,7 +5768,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_Cl // Cluster OtaSoftwareUpdateRequestor chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateRequestor_AnnounceOtaProvider( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, chip::NodeId providerLocation, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, chip::NodeId providerLocation, chip::VendorId vendorId, uint8_t announcementReason, const uint8_t * metadataForNode, uint32_t metadataForNode_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5805,7 +5780,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateRequestor_A .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5816,8 +5791,10 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_D .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, size_t len) +chip::ChipError::StorageType chip_ime_WriteAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t * value, + size_t len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; @@ -5827,7 +5804,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_OtaSoftwareUpdateRequestor_ chip::ByteSpan(value, len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5837,7 +5814,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_U return cluster.ReadAttributeUpdatePossible(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5850,7 +5827,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_C // End of Cluster OtaSoftwareUpdateRequestor // Cluster OccupancySensing -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_Occupancy(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_Occupancy(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5860,7 +5837,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_Occupancy(c return cluster.ReadAttributeOccupancy(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_Occupancy(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_Occupancy(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -5872,7 +5849,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_Occupa .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5882,7 +5859,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySe return cluster.ReadAttributeOccupancySensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5893,7 +5870,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySe .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5906,7 +5883,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_ClusterRevi // End of Cluster OccupancySensing // Cluster OnOff -chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Off(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Off(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5914,16 +5891,15 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Off(chip::Controller:: cluster.Associate(device, ZCLendpointId); return cluster.Off(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OffWithEffect(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t effectId, uint8_t effectVariant) +chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OffWithEffect(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t effectId, uint8_t effectVariant) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OnOffCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.OffWithEffect(nullptr, nullptr, effectId, effectVariant).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_On(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_On(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5931,7 +5907,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_On(chip::Controller::D cluster.Associate(device, ZCLendpointId); return cluster.On(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithRecallGlobalScene(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithRecallGlobalScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5939,9 +5915,8 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithRecallGlobalScen cluster.Associate(device, ZCLendpointId); return cluster.OnWithRecallGlobalScene(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithTimedOff(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t onOffControl, uint16_t onTime, +chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithTimedOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5949,7 +5924,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithTimedOff(chip::C cluster.Associate(device, ZCLendpointId); return cluster.OnWithTimedOff(nullptr, nullptr, onOffControl, onTime, offWaitTime).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Toggle(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Toggle(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5958,7 +5933,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Toggle(chip::Controlle return cluster.Toggle(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5967,9 +5942,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnOff(chip::Controller return cluster.ReadAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OnOff(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) +chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OnOffCluster cluster; @@ -5979,7 +5953,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OnOff(chip::Contr .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_GlobalSceneControl(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_GlobalSceneControl(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -5990,7 +5964,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_GlobalSceneControl(chi .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -5999,7 +5973,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnTime(chip::Controlle return cluster.ReadAttributeOnTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_OnTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_OnTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6007,8 +5981,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_OnTime(chip::Controll cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeOnTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OffWaitTime(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OffWaitTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6017,17 +5990,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OffWaitTime(chip::Cont return cluster.ReadAttributeOffWaitTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_OffWaitTime(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_OffWaitTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OnOffCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeOffWaitTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_StartUpOnOff(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_StartUpOnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6036,9 +6007,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_StartUpOnOff(chip::Con return cluster.ReadAttributeStartUpOnOff(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_StartUpOnOff(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_StartUpOnOff(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OnOffCluster cluster; @@ -6046,8 +6016,8 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_StartUpOnOff(chip::Co return cluster.WriteAttributeStartUpOnOff(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_FeatureMap(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OnOffCluster cluster; @@ -6055,7 +6025,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_FeatureMap(chip::Contr return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6068,7 +6038,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_ClusterRevision(chip:: // End of Cluster OnOff // Cluster OnOffSwitchConfiguration -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6078,7 +6048,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_Swi return cluster.ReadAttributeSwitchType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6088,7 +6058,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_Swi return cluster.ReadAttributeSwitchActions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_OnOffSwitchConfiguration_SwitchActions(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_OnOffSwitchConfiguration_SwitchActions(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -6098,7 +6068,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_OnOffSwitchConfiguration_Sw return cluster.WriteAttributeSwitchActions(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6112,10 +6082,10 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_Clu // Cluster OperationalCredentials chip::ChipError::StorageType -chip_ime_AppendCommand_OperationalCredentials_AddNOC(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, - chip::GroupId, const uint8_t * NOCValue, uint32_t NOCValue_Len, - const uint8_t * ICACValue, uint32_t ICACValue_Len, const uint8_t * IPKValue, - uint32_t IPKValue_Len, chip::NodeId caseAdminNode, uint16_t adminVendorId) +chip_ime_AppendCommand_OperationalCredentials_AddNOC(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, + const uint8_t * NOCValue, uint32_t NOCValue_Len, const uint8_t * ICACValue, + uint32_t ICACValue_Len, const uint8_t * IPKValue, uint32_t IPKValue_Len, + chip::NodeId caseAdminNode, uint16_t adminVendorId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OperationalCredentialsCluster cluster; @@ -6125,16 +6095,17 @@ chip_ime_AppendCommand_OperationalCredentials_AddNOC(chip::Controller::Device * chip::ByteSpan(IPKValue, IPKValue_Len), caseAdminNode, adminVendorId) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_AddTrustedRootCertificate( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * rootCertificate, - uint32_t rootCertificate_Len) +chip::ChipError::StorageType +chip_ime_AppendCommand_OperationalCredentials_AddTrustedRootCertificate(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, const uint8_t * rootCertificate, + uint32_t rootCertificate_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OperationalCredentialsCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.AddTrustedRootCertificate(nullptr, nullptr, chip::ByteSpan(rootCertificate, rootCertificate_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_AttestationRequest(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_AttestationRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * attestationNonce, @@ -6145,15 +6116,17 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_Attes cluster.Associate(device, ZCLendpointId); return cluster.AttestationRequest(nullptr, nullptr, chip::ByteSpan(attestationNonce, attestationNonce_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_CertificateChainRequest( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t certificateType) +chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_CertificateChainRequest(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId, + uint8_t certificateType) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OperationalCredentialsCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.CertificateChainRequest(nullptr, nullptr, certificateType).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_OpCSRRequest(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_OpCSRRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * CSRNonce, uint32_t CSRNonce_Len) @@ -6163,7 +6136,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_OpCSR cluster.Associate(device, ZCLendpointId); return cluster.OpCSRRequest(nullptr, nullptr, chip::ByteSpan(CSRNonce, CSRNonce_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_RemoveFabric(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_RemoveFabric(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t fabricIndex) { @@ -6173,7 +6146,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_Remov return cluster.RemoveFabric(nullptr, nullptr, fabricIndex).AsInteger(); } chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_RemoveTrustedRootCertificate( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * trustedRootIdentifier, + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * trustedRootIdentifier, uint32_t trustedRootIdentifier_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6182,7 +6155,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_Remov return cluster.RemoveTrustedRootCertificate(nullptr, nullptr, chip::ByteSpan(trustedRootIdentifier, trustedRootIdentifier_Len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_UpdateFabricLabel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_UpdateFabricLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * label, uint32_t label_Len) @@ -6194,9 +6167,9 @@ chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_Updat .AsInteger(); } chip::ChipError::StorageType -chip_ime_AppendCommand_OperationalCredentials_UpdateNOC(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, - chip::GroupId, const uint8_t * NOCValue, uint32_t NOCValue_Len, - const uint8_t * ICACValue, uint32_t ICACValue_Len) +chip_ime_AppendCommand_OperationalCredentials_UpdateNOC(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, + const uint8_t * NOCValue, uint32_t NOCValue_Len, const uint8_t * ICACValue, + uint32_t ICACValue_Len) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OperationalCredentialsCluster cluster; @@ -6205,7 +6178,7 @@ chip_ime_AppendCommand_OperationalCredentials_UpdateNOC(chip::Controller::Device .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_FabricsList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_FabricsList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6218,7 +6191,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_Fabri .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6228,7 +6201,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_Suppo return cluster.ReadAttributeSupportedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6238,8 +6211,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_Commi return cluster.ReadAttributeCommissionedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_TrustedRootCertificates( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_TrustedRootCertificates(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::OperationalCredentialsCluster cluster; @@ -6250,7 +6224,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_Trust .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CurrentFabricIndex(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CurrentFabricIndex(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6260,7 +6234,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_Curre return cluster.ReadAttributeCurrentFabricIndex(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6273,8 +6247,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_Clust // End of Cluster OperationalCredentials // Cluster PowerSource -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Status(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Status(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6283,8 +6256,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Status(chip::Con return cluster.ReadAttributeStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Order(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Order(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6293,7 +6265,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Order(chip::Cont return cluster.ReadAttributeOrder(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Description(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Description(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6303,7 +6275,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Description(chip return cluster.ReadAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryVoltage(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryVoltage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6313,7 +6285,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryVoltage(c return cluster.ReadAttributeBatteryVoltage(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6324,7 +6296,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryPercentRe .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6335,7 +6307,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryTimeRemai .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6345,7 +6317,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeLev return cluster.ReadAttributeBatteryChargeLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6358,7 +6330,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ActiveBatteryFau .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeState(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeState(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6368,7 +6340,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeSta return cluster.ReadAttributeBatteryChargeState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_FeatureMap(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6378,7 +6350,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_FeatureMap(chip: return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6391,7 +6363,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ClusterRevision( // End of Cluster PowerSource // Cluster PressureMeasurement -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6401,7 +6373,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_Measured return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -6415,7 +6387,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_Mea .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6425,7 +6397,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MinMeasu return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6435,7 +6407,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MaxMeasu return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6448,7 +6420,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_ClusterR // End of Cluster PressureMeasurement // Cluster PumpConfigurationAndControl -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6458,7 +6430,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6468,7 +6440,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6478,7 +6450,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstPressure(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6488,7 +6460,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMinConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstPressure(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6498,7 +6470,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinCompPressure(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinCompPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6508,7 +6480,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMinCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxCompPressure(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxCompPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6518,7 +6490,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstSpeed(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstSpeed(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6528,7 +6500,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMinConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstSpeed(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstSpeed(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6538,7 +6510,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstFlow(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstFlow(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6548,7 +6520,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMinConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstFlow(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstFlow(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6558,7 +6530,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstTemp(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstTemp(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6568,7 +6540,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMinConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstTemp(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstTemp(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6578,7 +6550,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeMaxConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_PumpStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_PumpStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6588,7 +6560,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributePumpStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_PumpStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_PumpStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -6602,7 +6574,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndCon } chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::PumpConfigurationAndControlCluster cluster; @@ -6611,8 +6583,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::PumpConfigurationAndControlCluster cluster; @@ -6621,7 +6594,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6631,7 +6604,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Capacity(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Capacity(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -6644,7 +6617,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndCon .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Speed(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Speed(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6655,7 +6628,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ } chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::PumpConfigurationAndControlCluster cluster; @@ -6664,7 +6637,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6674,7 +6647,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_PumpConfigurationAndControl_OperationMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_PumpConfigurationAndControl_OperationMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -6684,7 +6657,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_PumpConfigurationAndControl return cluster.WriteAttributeOperationMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ControlMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ControlMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6694,7 +6667,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_PumpConfigurationAndControl_ControlMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_PumpConfigurationAndControl_ControlMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -6703,7 +6676,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_PumpConfigurationAndControl cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeControlMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_AlarmMask(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_AlarmMask(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6713,7 +6686,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeAlarmMask(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_FeatureMap(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6723,7 +6696,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6736,7 +6709,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ // End of Cluster PumpConfigurationAndControl // Cluster RelativeHumidityMeasurement -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6746,8 +6719,10 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MeasuredValue( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + uint16_t minInterval, + uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::RelativeHumidityMeasurementCluster cluster; @@ -6758,7 +6733,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasure .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6768,7 +6743,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6778,7 +6753,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_Tolerance(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_Tolerance(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6788,7 +6763,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_Tolerance(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_Tolerance(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -6801,7 +6776,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasure .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6814,11 +6789,11 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ // End of Cluster RelativeHumidityMeasurement // Cluster Scenes -chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_AddScene(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t groupId, - uint8_t sceneId, uint16_t transitionTime, - const uint8_t * sceneName, uint32_t sceneName_Len, - chip::ClusterId clusterId, uint8_t length, uint8_t value) +chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_AddScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId, uint8_t sceneId, + uint16_t transitionTime, const uint8_t * sceneName, + uint32_t sceneName_Len, chip::ClusterId clusterId, + uint8_t length, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ScenesCluster cluster; @@ -6828,7 +6803,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_AddScene(chip::Contro chip::CharSpan(reinterpret_cast(sceneName), sceneName_Len), clusterId, length, value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_GetSceneMembership(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_GetSceneMembership(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t groupId) { @@ -6837,16 +6812,16 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_GetSceneMembership(ch cluster.Associate(device, ZCLendpointId); return cluster.GetSceneMembership(nullptr, nullptr, groupId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RecallScene(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t groupId, uint8_t sceneId, uint16_t transitionTime) +chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RecallScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId, uint8_t sceneId, + uint16_t transitionTime) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ScenesCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.RecallScene(nullptr, nullptr, groupId, sceneId, transitionTime).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RemoveAllScenes(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RemoveAllScenes(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t groupId) { @@ -6855,27 +6830,24 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RemoveAllScenes(chip: cluster.Associate(device, ZCLendpointId); return cluster.RemoveAllScenes(nullptr, nullptr, groupId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RemoveScene(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t groupId, uint8_t sceneId) +chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RemoveScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId, uint8_t sceneId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ScenesCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.RemoveScene(nullptr, nullptr, groupId, sceneId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_StoreScene(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t groupId, uint8_t sceneId) +chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_StoreScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId, uint8_t sceneId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ScenesCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.StoreScene(nullptr, nullptr, groupId, sceneId).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_ViewScene(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t groupId, uint8_t sceneId) +chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_ViewScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t groupId, uint8_t sceneId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ScenesCluster cluster; @@ -6883,8 +6855,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_ViewScene(chip::Contr return cluster.ViewScene(nullptr, nullptr, groupId, sceneId).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneCount(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6893,8 +6864,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneCount(chip::Cont return cluster.ReadAttributeSceneCount(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentScene(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentScene(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6903,8 +6873,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentScene(chip::Co return cluster.ReadAttributeCurrentScene(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6913,8 +6882,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::Co return cluster.ReadAttributeCurrentGroup(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneValid(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneValid(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6923,8 +6891,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneValid(chip::Cont return cluster.ReadAttributeSceneValid(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_NameSupport(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_NameSupport(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -6933,7 +6900,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_NameSupport(chip::Con return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6946,7 +6913,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_ClusterRevision(chip: // End of Cluster Scenes // Cluster SoftwareDiagnostics -chip::ChipError::StorageType chip_ime_AppendCommand_SoftwareDiagnostics_ResetWatermarks(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_SoftwareDiagnostics_ResetWatermarks(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { @@ -6956,7 +6923,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_SoftwareDiagnostics_ResetWat return cluster.ResetWatermarks(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapFree(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapFree(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6966,7 +6933,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentH return cluster.ReadAttributeCurrentHeapFree(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapUsed(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapUsed(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6976,7 +6943,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentH return cluster.ReadAttributeCurrentHeapUsed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -6987,7 +6954,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentH .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7000,7 +6967,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterR // End of Cluster SoftwareDiagnostics // Cluster Switch -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_NumberOfPositions(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_NumberOfPositions(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7010,7 +6977,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_NumberOfPositions(chi return cluster.ReadAttributeNumberOfPositions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_CurrentPosition(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_CurrentPosition(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7020,7 +6987,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_CurrentPosition(chip: return cluster.ReadAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_CurrentPosition(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_CurrentPosition(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -7033,8 +7000,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_CurrentPosition( .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_MultiPressMax(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_MultiPressMax(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7043,8 +7009,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_MultiPressMax(chip::C return cluster.ReadAttributeMultiPressMax(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_FeatureMap(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7053,7 +7018,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_FeatureMap(chip::Cont return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7066,7 +7031,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_ClusterRevision(chip: // End of Cluster Switch // Cluster TvChannel -chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * match, uint32_t match_Len) { @@ -7075,7 +7040,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannel(chip cluster.Associate(device, ZCLendpointId); return cluster.ChangeChannel(nullptr, nullptr, chip::CharSpan(reinterpret_cast(match), match_Len)).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannelByNumber(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannelByNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t majorNumber, uint16_t minorNumber) { @@ -7084,7 +7049,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannelByNum cluster.Associate(device, ZCLendpointId); return cluster.ChangeChannelByNumber(nullptr, nullptr, majorNumber, minorNumber).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_SkipChannel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_SkipChannel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t count) { @@ -7094,7 +7059,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_SkipChannel(chip:: return cluster.SkipChannel(nullptr, nullptr, count).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7106,7 +7071,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelList(chip .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelLineup(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelLineup(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7117,7 +7082,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelLineup(ch .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7128,7 +7093,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(c .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7141,7 +7106,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_ClusterRevision(ch // End of Cluster TvChannel // Cluster TargetNavigator -chip::ChipError::StorageType chip_ime_AppendCommand_TargetNavigator_NavigateTarget(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TargetNavigator_NavigateTarget(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t target, const uint8_t * data, uint32_t data_Len) @@ -7153,7 +7118,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TargetNavigator_NavigateTarg .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7166,7 +7131,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_TargetNaviga .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7179,7 +7144,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_ClusterRevis // End of Cluster TargetNavigator // Cluster TemperatureMeasurement -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7189,7 +7154,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_Measu return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -7203,7 +7168,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_ .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7213,7 +7178,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MinMe return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7223,7 +7188,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MaxMe return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_Tolerance(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_Tolerance(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7233,7 +7198,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_Toler return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_Tolerance(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_Tolerance(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -7246,7 +7211,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_ .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7259,15 +7224,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_Clust // End of Cluster TemperatureMeasurement // Cluster TestCluster -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_Test(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId) +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_Test(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.Test(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestAddArguments(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestAddArguments(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t arg1, uint8_t arg2) { @@ -7276,7 +7241,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestAddArguments cluster.Associate(device, ZCLendpointId); return cluster.TestAddArguments(nullptr, nullptr, arg1, arg2).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestEnumsRequest(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestEnumsRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, chip::VendorId arg1, uint8_t arg2) { @@ -7285,7 +7250,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestEnumsRequest cluster.Associate(device, ZCLendpointId); return cluster.TestEnumsRequest(nullptr, nullptr, arg1, arg2).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestListInt8UArgumentRequest(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestListInt8UArgumentRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t arg1) { @@ -7294,7 +7259,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestListInt8UArg cluster.Associate(device, ZCLendpointId); return cluster.TestListInt8UArgumentRequest(nullptr, nullptr, arg1).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestListInt8UReverseRequest(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestListInt8UReverseRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t arg1) { @@ -7304,7 +7269,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestListInt8URev return cluster.TestListInt8UReverseRequest(nullptr, nullptr, arg1).AsInteger(); } chip::ChipError::StorageType -chip_ime_AppendCommand_TestCluster_TestListStructArgumentRequest(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip_ime_AppendCommand_TestCluster_TestListStructArgumentRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t a, bool b, uint8_t c, const uint8_t * d, uint32_t d_Len, const uint8_t * e, uint32_t e_Len, uint8_t f) { @@ -7316,7 +7281,7 @@ chip_ime_AppendCommand_TestCluster_TestListStructArgumentRequest(chip::Controlle chip::CharSpan(reinterpret_cast(e), e_Len), f) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestNotHandled(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestNotHandled(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7324,7 +7289,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestNotHandled(c cluster.Associate(device, ZCLendpointId); return cluster.TestNotHandled(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestNullableOptionalRequest(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestNullableOptionalRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t arg1) { @@ -7333,7 +7298,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestNullableOpti cluster.Associate(device, ZCLendpointId); return cluster.TestNullableOptionalRequest(nullptr, nullptr, arg1).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestSpecific(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestSpecific(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7342,7 +7307,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestSpecific(chi return cluster.TestSpecific(nullptr, nullptr).AsInteger(); } chip::ChipError::StorageType -chip_ime_AppendCommand_TestCluster_TestStructArgumentRequest(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, +chip_ime_AppendCommand_TestCluster_TestStructArgumentRequest(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t a, bool b, uint8_t c, const uint8_t * d, uint32_t d_Len, const uint8_t * e, uint32_t e_Len, uint8_t f) { @@ -7354,7 +7319,7 @@ chip_ime_AppendCommand_TestCluster_TestStructArgumentRequest(chip::Controller::D chip::CharSpan(reinterpret_cast(e), e_Len), f) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestUnknownCommand(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestUnknownCommand(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7363,8 +7328,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestUnknownComma return cluster.TestUnknownCommand(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Boolean(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Boolean(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7373,16 +7337,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Boolean(chip::Co return cluster.ReadAttributeBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Boolean(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, bool value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Boolean(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, bool value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeBoolean(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap8(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap8(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7391,17 +7354,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap8(chip::Co return cluster.ReadAttributeBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap8(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap8(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeBitmap8(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap16(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap16(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7410,7 +7371,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap16(chip::C return cluster.ReadAttributeBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap16(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap16(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t value) { @@ -7419,8 +7380,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap16(chip:: cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeBitmap16(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap32(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap32(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7429,7 +7389,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap32(chip::C return cluster.ReadAttributeBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap32(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap32(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint32_t value) { @@ -7438,8 +7398,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap32(chip:: cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeBitmap32(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap64(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap64(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7448,7 +7407,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap64(chip::C return cluster.ReadAttributeBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap64(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap64(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint64_t value) { @@ -7457,8 +7416,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap64(chip:: cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeBitmap64(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7467,16 +7425,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8u(chip::Cont return cluster.ReadAttributeInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int8u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int8u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt8u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7485,17 +7442,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16u(chip::Con return cluster.ReadAttributeInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int16u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int16u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt16u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7504,17 +7459,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32u(chip::Con return cluster.ReadAttributeInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int32u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint32_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int32u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint32_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt32u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7523,17 +7476,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64u(chip::Con return cluster.ReadAttributeInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int64u(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint64_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int64u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint64_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt64u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7542,16 +7493,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8s(chip::Cont return cluster.ReadAttributeInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int8s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, int8_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int8s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, int8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt8s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7560,17 +7510,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16s(chip::Con return cluster.ReadAttributeInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int16s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - int16_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int16s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, int16_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt16s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7579,17 +7527,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32s(chip::Con return cluster.ReadAttributeInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int32s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - int32_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int32s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, int32_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt32s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7598,17 +7544,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64s(chip::Con return cluster.ReadAttributeInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int64s(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - int64_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int64s(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, int64_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeInt64s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum8(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum8(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7617,16 +7561,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum8(chip::Cont return cluster.ReadAttributeEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Enum8(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Enum8(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeEnum8(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum16(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum16(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7635,16 +7578,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum16(chip::Con return cluster.ReadAttributeEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Enum16(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint16_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Enum16(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint16_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeEnum16(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_OctetString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_OctetString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7654,7 +7596,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_OctetString(chip return cluster.ReadAttributeOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_OctetString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_OctetString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, size_t len) { @@ -7665,7 +7607,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_OctetString(chi .WriteAttributeOctetString(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), chip::ByteSpan(value, len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListInt8u(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListInt8u(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7676,7 +7618,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListInt8u(chip:: .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListOctetString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListOctetString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7688,7 +7630,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListOctetString( .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListStructOctetString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListStructOctetString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7701,7 +7643,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListStructOctetS .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongOctetString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongOctetString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7712,7 +7654,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongOctetString( .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongOctetString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongOctetString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, size_t len) { @@ -7724,7 +7666,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongOctetString chip::ByteSpan(value, len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_CharString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_CharString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7734,7 +7676,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_CharString(chip: return cluster.ReadAttributeCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_CharString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_CharString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, size_t len) { @@ -7746,7 +7688,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_CharString(chip chip::CharSpan(reinterpret_cast(value), len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongCharString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongCharString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7756,7 +7698,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongCharString(c return cluster.ReadAttributeLongCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongCharString(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongCharString(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, size_t len) { @@ -7768,8 +7710,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongCharString( chip::CharSpan(reinterpret_cast(value), len)) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochUs(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochUs(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7778,17 +7719,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochUs(chip::Co return cluster.ReadAttributeEpochUs(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_EpochUs(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint64_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_EpochUs(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint64_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeEpochUs(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochS(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochS(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7797,17 +7736,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochS(chip::Con return cluster.ReadAttributeEpochS(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_EpochS(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint32_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_EpochS(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint32_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::TestClusterCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeEpochS(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_VendorId(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_VendorId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7816,7 +7753,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_VendorId(chip::C return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_VendorId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_VendorId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, chip::VendorId value) { @@ -7825,7 +7762,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_VendorId(chip:: cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeVendorId(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListNullablesAndOptionalsStruct(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListNullablesAndOptionalsStruct(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7838,7 +7775,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListNullablesAnd .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Unsupported(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Unsupported(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7848,7 +7785,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Unsupported(chip return cluster.ReadAttributeUnsupported(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Unsupported(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Unsupported(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, bool value) { @@ -7857,7 +7794,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Unsupported(chi cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeUnsupported(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7870,7 +7807,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ClusterRevision( // End of Cluster TestCluster // Cluster Thermostat -chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_ClearWeeklySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_ClearWeeklySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7878,7 +7815,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_ClearWeeklySchedu cluster.Associate(device, ZCLendpointId); return cluster.ClearWeeklySchedule(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_GetRelayStatusLog(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_GetRelayStatusLog(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -7886,7 +7823,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_GetRelayStatusLog cluster.Associate(device, ZCLendpointId); return cluster.GetRelayStatusLog(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_GetWeeklySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_GetWeeklySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t daysToReturn, uint8_t modeToReturn) { @@ -7895,7 +7832,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_GetWeeklySchedule cluster.Associate(device, ZCLendpointId); return cluster.GetWeeklySchedule(nullptr, nullptr, daysToReturn, modeToReturn).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_SetWeeklySchedule(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_SetWeeklySchedule(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t numberOfTransitionsForSequence, uint8_t dayOfWeekForSequence, @@ -7908,7 +7845,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_SetWeeklySchedule .SetWeeklySchedule(nullptr, nullptr, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, payload) .AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_SetpointRaiseLower(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_SetpointRaiseLower(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t mode, int8_t amount) { @@ -7918,7 +7855,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_SetpointRaiseLowe return cluster.SetpointRaiseLower(nullptr, nullptr, mode, amount).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_LocalTemperature(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_LocalTemperature(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7928,7 +7865,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_LocalTemperature( return cluster.ReadAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_LocalTemperature(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_LocalTemperature(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -7941,7 +7878,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_LocalTempera .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7952,7 +7889,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpoin .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7963,7 +7900,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpoin .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7974,7 +7911,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpoin .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7985,7 +7922,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpoin .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -7996,7 +7933,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSe .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedCoolingSetpoint(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedCoolingSetpoint(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t value) { @@ -8006,7 +7943,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedCoolingS return cluster.WriteAttributeOccupiedCoolingSetpoint(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8017,7 +7954,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSe .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedHeatingSetpoint(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedHeatingSetpoint(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t value) { @@ -8027,7 +7964,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedHeatingS return cluster.WriteAttributeOccupiedHeatingSetpoint(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8038,7 +7975,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLi .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinHeatSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinHeatSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t value) { @@ -8048,7 +7985,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinHeatSetpointL return cluster.WriteAttributeMinHeatSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8059,7 +7996,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLi .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxHeatSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxHeatSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t value) { @@ -8069,7 +8006,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxHeatSetpointL return cluster.WriteAttributeMaxHeatSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8080,7 +8017,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLi .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinCoolSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinCoolSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t value) { @@ -8090,7 +8027,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinCoolSetpointL return cluster.WriteAttributeMinCoolSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8101,7 +8038,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLi .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxCoolSetpointLimit(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxCoolSetpointLimit(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int16_t value) { @@ -8111,7 +8048,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxCoolSetpointL return cluster.WriteAttributeMaxCoolSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBand(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBand(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8121,7 +8058,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBa return cluster.ReadAttributeMinSetpointDeadBand(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinSetpointDeadBand(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinSetpointDeadBand(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, int8_t value) { @@ -8131,7 +8068,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinSetpointDeadB return cluster.WriteAttributeMinSetpointDeadBand(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8142,7 +8079,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ControlSequenceOf .AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_ControlSequenceOfOperation(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_ControlSequenceOfOperation(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -8153,7 +8090,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_ControlSequenceO .WriteAttributeControlSequenceOfOperation(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_SystemMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_SystemMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8163,7 +8100,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_SystemMode(chip:: return cluster.ReadAttributeSystemMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_SystemMode(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_SystemMode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { @@ -8172,7 +8109,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_SystemMode(chip: cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeSystemMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_StartOfWeek(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_StartOfWeek(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8182,7 +8119,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_StartOfWeek(chip: return cluster.ReadAttributeStartOfWeek(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8193,7 +8130,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTra .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8204,7 +8141,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfDailyTran .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_FeatureMap(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8214,7 +8151,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_FeatureMap(chip:: return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8228,7 +8165,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ClusterRevision(c // Cluster ThermostatUserInterfaceConfiguration chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; @@ -8238,7 +8175,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfi } chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; @@ -8247,7 +8184,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConf .AsInteger(); } chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; @@ -8256,7 +8193,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfi } chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; @@ -8265,7 +8202,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConf .AsInteger(); } chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; @@ -8275,7 +8212,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfi } chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; @@ -8285,7 +8222,7 @@ chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConf .AsInteger(); } chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; @@ -8296,7 +8233,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfi // End of Cluster ThermostatUserInterfaceConfiguration // Cluster ThreadNetworkDiagnostics -chip::ChipError::StorageType chip_ime_AppendCommand_ThreadNetworkDiagnostics_ResetCounts(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_ThreadNetworkDiagnostics_ResetCounts(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { @@ -8306,7 +8243,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_ThreadNetworkDiagnostics_Res return cluster.ResetCounts(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8316,7 +8253,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Cha return cluster.ReadAttributeChannel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8326,7 +8263,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Rou return cluster.ReadAttributeRoutingRole(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8336,7 +8273,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Net return cluster.ReadAttributeNetworkName(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8346,7 +8283,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Pan return cluster.ReadAttributePanId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8356,7 +8293,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Ext return cluster.ReadAttributeExtendedPanId(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8367,7 +8304,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Mes .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8377,7 +8314,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Ove return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8390,7 +8327,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Nei .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8403,7 +8340,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Rou .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8413,7 +8350,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Par return cluster.ReadAttributePartitionId(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8423,7 +8360,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Wei return cluster.ReadAttributeWeighting(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8433,7 +8370,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Dat return cluster.ReadAttributeDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8443,7 +8380,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Sta return cluster.ReadAttributeStableDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8453,7 +8390,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Lea return cluster.ReadAttributeLeaderRouterId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8463,7 +8400,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Det return cluster.ReadAttributeDetachedRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8473,7 +8410,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Chi return cluster.ReadAttributeChildRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8483,7 +8420,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Rou return cluster.ReadAttributeRouterRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8493,7 +8430,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Lea return cluster.ReadAttributeLeaderRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8503,8 +8440,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Att return cluster.ReadAttributeAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8514,7 +8452,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Par } chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8524,7 +8462,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Bet .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8534,7 +8472,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Par return cluster.ReadAttributeParentChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8544,7 +8482,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxT return cluster.ReadAttributeTxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8554,7 +8492,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxU return cluster.ReadAttributeTxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8564,7 +8502,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxB return cluster.ReadAttributeTxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8575,7 +8513,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxA .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8585,8 +8523,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxA return cluster.ReadAttributeTxAckedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8595,7 +8534,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxN .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8605,7 +8544,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxD return cluster.ReadAttributeTxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8615,7 +8554,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxD return cluster.ReadAttributeTxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8625,7 +8564,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxB return cluster.ReadAttributeTxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8636,7 +8575,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxB .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8646,7 +8585,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxO return cluster.ReadAttributeTxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8657,7 +8596,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxR } chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8667,7 +8606,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxD } chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8676,7 +8615,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxI .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8686,7 +8625,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxE return cluster.ReadAttributeTxErrCcaCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8696,8 +8635,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxE return cluster.ReadAttributeTxErrAbortCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8706,7 +8646,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxE .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8716,7 +8656,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxT return cluster.ReadAttributeRxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8726,7 +8666,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxU return cluster.ReadAttributeRxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8736,7 +8676,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxB return cluster.ReadAttributeRxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8746,7 +8686,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxD return cluster.ReadAttributeRxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8756,7 +8696,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxD return cluster.ReadAttributeRxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8766,7 +8706,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxB return cluster.ReadAttributeRxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8777,7 +8717,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxB .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8787,8 +8727,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxO return cluster.ReadAttributeRxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8797,8 +8738,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxA .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8807,7 +8749,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxD .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8817,7 +8759,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxD return cluster.ReadAttributeRxDuplicatedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8828,7 +8770,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxE } chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8837,8 +8779,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxE .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType +chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8847,7 +8790,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxE .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8857,7 +8800,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxE return cluster.ReadAttributeRxErrSecCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8867,7 +8810,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxE return cluster.ReadAttributeRxErrFcsCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8877,7 +8820,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxE return cluster.ReadAttributeRxErrOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8887,7 +8830,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Act return cluster.ReadAttributeActiveTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8897,7 +8840,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Pen return cluster.ReadAttributePendingTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8907,7 +8850,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Del return cluster.ReadAttributeDelay(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8920,7 +8863,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Sec .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8931,7 +8874,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Cha } chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8942,8 +8885,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Ope .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::ThreadNetworkDiagnosticsCluster cluster; @@ -8954,7 +8898,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Act .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8967,7 +8911,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Clu // End of Cluster ThreadNetworkDiagnostics // Cluster WakeOnLan -chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8978,7 +8922,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddres .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -8991,9 +8935,8 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(ch // End of Cluster WakeOnLan // Cluster WiFiNetworkDiagnostics -chip::ChipError::StorageType chip_ime_AppendCommand_WiFiNetworkDiagnostics_ResetCounts(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, - chip::GroupId) +chip::ChipError::StorageType +chip_ime_AppendCommand_WiFiNetworkDiagnostics_ResetCounts(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WiFiNetworkDiagnosticsCluster cluster; @@ -9001,7 +8944,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WiFiNetworkDiagnostics_Reset return cluster.ResetCounts(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9011,7 +8954,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid return cluster.ReadAttributeBssid(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9021,7 +8964,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Secur return cluster.ReadAttributeSecurityType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9031,7 +8974,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiV return cluster.ReadAttributeWiFiVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9041,7 +8984,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Chann return cluster.ReadAttributeChannelNumber(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9051,7 +8994,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi( return cluster.ReadAttributeRssi(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconLostCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconLostCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9061,7 +9004,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Beaco return cluster.ReadAttributeBeaconLostCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconRxCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconRxCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9071,7 +9014,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Beaco return cluster.ReadAttributeBeaconRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9082,7 +9025,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Packe .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9093,7 +9036,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Packe .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9104,7 +9047,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Packe .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9115,7 +9058,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Packe .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9125,7 +9068,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Curre return cluster.ReadAttributeCurrentMaxRate(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_OverrunCount(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9135,7 +9078,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Overr return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9148,7 +9091,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Clust // End of Cluster WiFiNetworkDiagnostics // Cluster WindowCovering -chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_DownOrClose(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_DownOrClose(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -9156,7 +9099,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_DownOrClose(c cluster.Associate(device, ZCLendpointId); return cluster.DownOrClose(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftPercentage(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t liftPercentageValue, uint16_t liftPercent100thsValue) @@ -9166,7 +9109,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftPerce cluster.Associate(device, ZCLendpointId); return cluster.GoToLiftPercentage(nullptr, nullptr, liftPercentageValue, liftPercent100thsValue).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t liftValue) { @@ -9175,7 +9118,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftValue cluster.Associate(device, ZCLendpointId); return cluster.GoToLiftValue(nullptr, nullptr, liftValue).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltPercentage(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t tiltPercentageValue, uint16_t tiltPercent100thsValue) @@ -9185,7 +9128,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltPerce cluster.Associate(device, ZCLendpointId); return cluster.GoToTiltPercentage(nullptr, nullptr, tiltPercentageValue, tiltPercent100thsValue).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltValue(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t tiltValue) { @@ -9194,7 +9137,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltValue cluster.Associate(device, ZCLendpointId); return cluster.GoToTiltValue(nullptr, nullptr, tiltValue).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_StopMotion(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_StopMotion(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -9202,7 +9145,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_StopMotion(ch cluster.Associate(device, ZCLendpointId); return cluster.StopMotion(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_UpOrOpen(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_UpOrOpen(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -9211,8 +9154,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_UpOrOpen(chip return cluster.UpOrOpen(nullptr, nullptr).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Type(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Type(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -9221,7 +9163,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Type(chip::Co return cluster.ReadAttributeType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9232,7 +9174,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositi .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9243,7 +9185,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositi .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ConfigStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ConfigStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9253,7 +9195,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ConfigStatus( return cluster.ReadAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9264,8 +9206,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositi .AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercentage( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9276,7 +9219,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentP .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9287,8 +9230,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositi .AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercentage( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +chip::ChipError::StorageType +chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercentage(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9299,7 +9243,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentP .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_OperationalStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_OperationalStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9309,7 +9253,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_OperationalSt return cluster.ReadAttributeOperationalStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_OperationalStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_OperationalStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) @@ -9323,8 +9267,9 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_Operatio .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9334,7 +9279,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositio } chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPositionLiftPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9345,8 +9290,9 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPo .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9356,7 +9302,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositio } chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPositionTiltPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9367,7 +9313,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPo .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_EndProductType(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_EndProductType(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9377,8 +9323,9 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_EndProductTyp return cluster.ReadAttributeEndProductType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9389,7 +9336,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositi } chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9400,8 +9347,9 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentP .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths(chip::DeviceProxy * device, + chip::EndpointId ZCLendpointId, + chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9412,7 +9360,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositi } chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercent100ths( - chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) + chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; @@ -9423,7 +9371,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentP .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9434,7 +9382,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpen .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9445,7 +9393,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClos .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9456,7 +9404,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpen .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9467,8 +9415,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClos .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Mode(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Mode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); @@ -9477,16 +9424,15 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Mode(chip::Co return cluster.ReadAttributeMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_WriteAttribute_WindowCovering_Mode(chip::Controller::Device * device, - chip::EndpointId ZCLendpointId, chip::GroupId, - uint8_t value) +chip::ChipError::StorageType chip_ime_WriteAttribute_WindowCovering_Mode(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, + chip::GroupId, uint8_t value) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::WindowCoveringCluster cluster; cluster.Associate(device, ZCLendpointId); return cluster.WriteAttributeMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_SafetyStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_SafetyStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9496,7 +9442,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_SafetyStatus( return cluster.ReadAttributeSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_SafetyStatus(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_SafetyStatus(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { @@ -9509,7 +9455,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_SafetySt .AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_FeatureMap(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_FeatureMap(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { @@ -9519,7 +9465,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_FeatureMap(ch return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); } -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ClusterRevision(chip::Controller::Device * device, +chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ClusterRevision(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { diff --git a/src/controller/python/chip/clusters/command.cpp b/src/controller/python/chip/clusters/command.cpp index 7ba28684ef1794..b2ecd1a30fb59e 100644 --- a/src/controller/python/chip/clusters/command.cpp +++ b/src/controller/python/chip/clusters/command.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -32,9 +32,9 @@ using namespace chip::app; using PyObject = void *; extern "C" { -chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, Controller::Device * device, - chip::EndpointId endpointId, chip::ClusterId clusterId, - chip::CommandId commandId, const uint8_t * payload, size_t length); +chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, chip::EndpointId endpointId, + chip::ClusterId clusterId, chip::CommandId commandId, + const uint8_t * payload, size_t length); } namespace chip { @@ -121,9 +121,9 @@ void pychip_CommandSender_InitCallbacks(OnCommandSenderResponseCallback onComman gOnCommandSenderDoneCallback = onCommandSenderDoneCallback; } -chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, Controller::Device * device, - chip::EndpointId endpointId, chip::ClusterId clusterId, - chip::CommandId commandId, const uint8_t * payload, size_t length) +chip::ChipError::StorageType pychip_CommandSender_SendCommand(void * appContext, DeviceProxy * device, chip::EndpointId endpointId, + chip::ClusterId clusterId, chip::CommandId commandId, + const uint8_t * payload, size_t length) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/python/chip/clusters/write.cpp b/src/controller/python/chip/clusters/write.cpp index b6e2afb1e58be6..9d5549c1164cc4 100644 --- a/src/controller/python/chip/clusters/write.cpp +++ b/src/controller/python/chip/clusters/write.cpp @@ -19,8 +19,8 @@ #include #include +#include #include -#include #include #include @@ -33,7 +33,7 @@ using PyObject = void *; extern "C" { // Encodes n attribute write requests, follows 3 * n arguments, in the (AttributeWritePath*=void *, uint8_t*, size_t) order. -chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, Controller::Device * device, size_t n, ...); +chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, size_t n, ...); } namespace chip { @@ -97,7 +97,7 @@ void pychip_WriteClient_InitCallbacks(OnWriteResponseCallback onWriteResponseCal gOnWriteDoneCallback = onWriteDoneCallback; } -chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, Controller::Device * device, size_t n, ...) +chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, size_t n, ...) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/python/templates/python-CHIPClusters-cpp.zapt b/src/controller/python/templates/python-CHIPClusters-cpp.zapt index 7a64abacf92363..dbae1f02d41a3d 100644 --- a/src/controller/python/templates/python-CHIPClusters-cpp.zapt +++ b/src/controller/python/templates/python-CHIPClusters-cpp.zapt @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include @@ -206,7 +206,7 @@ void chip_ime_SetFailureResponseDelegate(FailureResponseDelegate delegate) // Cluster {{asUpperCamelCase name}} {{#chip_cluster_commands}} -chip::ChipError::StorageType chip_ime_AppendCommand_{{asUpperCamelCase clusterName}}_{{asUpperCamelCase name}}(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId{{#chip_cluster_command_arguments_with_structs_expanded}}, {{#if (isString type)}}const uint8_t * {{asLowerCamelCase label}}, uint32_t {{asLowerCamelCase label}}_Len{{else}}{{chipType}} {{asLowerCamelCase label}}{{/if}}{{/chip_cluster_command_arguments_with_structs_expanded}}) +chip::ChipError::StorageType chip_ime_AppendCommand_{{asUpperCamelCase clusterName}}_{{asUpperCamelCase name}}(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId{{#chip_cluster_command_arguments_with_structs_expanded}}, {{#if (isString type)}}const uint8_t * {{asLowerCamelCase label}}, uint32_t {{asLowerCamelCase label}}_Len{{else}}{{chipType}} {{asLowerCamelCase label}}{{/if}}{{/chip_cluster_command_arguments_with_structs_expanded}}) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::{{asUpperCamelCase clusterName}}Cluster cluster; @@ -216,7 +216,7 @@ chip::ChipError::StorageType chip_ime_AppendCommand_{{asUpperCamelCase clusterNa {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -chip::ChipError::StorageType chip_ime_ReadAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) +chip::ChipError::StorageType chip_ime_ReadAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::{{asUpperCamelCase parent.name}}Cluster cluster; @@ -229,7 +229,7 @@ chip::ChipError::StorageType chip_ime_ReadAttribute_{{asUpperCamelCase parent.na } {{#if isReportableAttribute}} -chip::ChipError::StorageType chip_ime_SubscribeAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) +chip::ChipError::StorageType chip_ime_SubscribeAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::{{asUpperCamelCase parent.name}}Cluster cluster; @@ -244,7 +244,7 @@ chip::ChipError::StorageType chip_ime_SubscribeAttribute_{{asUpperCamelCase pare {{/if}} {{#if isWritableAttribute}} -chip::ChipError::StorageType chip_ime_WriteAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, {{#if (isString type)}} uint8_t * value, size_t len{{else}}{{chipType}} value{{/if}}) +chip::ChipError::StorageType chip_ime_WriteAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId, {{#if (isString type)}} uint8_t * value, size_t len{{else}}{{chipType}} value{{/if}}) { VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); chip::Controller::{{asUpperCamelCase parent.name}}Cluster cluster; diff --git a/src/controller/tests/BUILD.gn b/src/controller/tests/BUILD.gn index 084633fe94f4fd..2aec5d280f4191 100644 --- a/src/controller/tests/BUILD.gn +++ b/src/controller/tests/BUILD.gn @@ -23,8 +23,6 @@ chip_test_suite("tests") { test_sources = [ "TestCommissionableNodeController.cpp" ] - test_sources += [ "TestDevice.cpp" ] - cflags = [ "-Wconversion" ] public_deps = [ diff --git a/src/controller/tests/TestDevice.cpp b/src/controller/tests/TestDevice.cpp index 71c202d2c369cb..5e6bd910246b3d 100644 --- a/src/controller/tests/TestDevice.cpp +++ b/src/controller/tests/TestDevice.cpp @@ -18,7 +18,7 @@ #if CONFIG_NETWORK_LAYER_BLE #include #endif // CONFIG_NETWORK_LAYER_BLE -#include +#include #include #include #include @@ -83,7 +83,7 @@ void TestDevice_EstablishSessionDirectly(nlTestSuite * inSuite, void * inContext .idAllocator = &idAllocator, .fabricsTable = fabrics, }; - Device device; + CommissioneeDeviceProxy device; NodeId mockNodeId = 1; FabricIndex mockFabricIndex = 1; Inet::IPAddress mockAddr; diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m index 821baaf611a9dd..acac3092056ab2 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/MultiAdmin/MultiAdminViewController.m @@ -211,6 +211,7 @@ - (IBAction)openPairingWindow:(id)sender NSString * output; NSError * error; + CHIPDeviceController * controller = InitializeCHIP(); if ([self.useOnboardingTokenSwitch isOn]) { NSString * discriminatorStr = [self.discriminatorField text]; if (discriminatorStr.length == 0) { @@ -218,7 +219,8 @@ - (IBAction)openPairingWindow:(id)sender } NSInteger discriminator = [discriminatorStr intValue]; - output = [chipDevice openPairingWindowWithPIN:timeout + output = [controller openPairingWindowWithPIN:deviceId + duration:timeout discriminator:discriminator setupPIN:setupPIN error:&error]; @@ -230,7 +232,7 @@ - (IBAction)openPairingWindow:(id)sender [self updateResult:@"Failed in opening the pairing window"]; } } else { - BOOL didSend = [chipDevice openPairingWindow:timeout error:&error]; + BOOL didSend = [controller openPairingWindow:deviceId duration:timeout error:&error]; if (didSend) { [self updateResult:@"Scan the QR code on the device"]; } else { diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m index 8b016895154492..3b96e61e5f9555 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Temperature Sensor/TemperatureSensorViewController.m @@ -203,7 +203,8 @@ - (void)reportFromUserEnteredSettings if (chipDevice) { CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:chipDevice endpoint:1 queue:dispatch_get_main_queue()]; - + // TODO - Fix temperature reporting in iOS CHIPTool + /* [cluster subscribeAttributeMeasuredValueWithMinInterval:minIntervalSeconds maxInterval:maxIntervalSeconds @@ -220,6 +221,7 @@ - (void)reportFromUserEnteredSettings NSNumber * value = values[@"value"]; [self updateTempInUI:value.shortValue]; }]; + */ } else { NSLog(@"Status: Failed to establish a connection with the device"); } diff --git a/src/darwin/Framework/CHIP/CHIPDevice.h b/src/darwin/Framework/CHIP/CHIPDevice.h index 55419e90173deb..f2384c4322eda7 100644 --- a/src/darwin/Framework/CHIP/CHIPDevice.h +++ b/src/darwin/Framework/CHIP/CHIPDevice.h @@ -24,13 +24,6 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPDevice : NSObject -- (BOOL)openPairingWindow:(NSUInteger)duration error:(NSError * __autoreleasing *)error; -- (nullable NSString *)openPairingWindowWithPIN:(NSUInteger)duration - discriminator:(NSUInteger)discriminator - setupPIN:(NSUInteger)setupPIN - error:(NSError * __autoreleasing *)error; -- (BOOL)isActive; - - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/CHIPDevice.mm b/src/darwin/Framework/CHIP/CHIPDevice.mm index ab027f5b1621da..ae1d86a2597f08 100644 --- a/src/darwin/Framework/CHIP/CHIPDevice.mm +++ b/src/darwin/Framework/CHIP/CHIPDevice.mm @@ -18,13 +18,11 @@ #import "CHIPDevice_Internal.h" #import "CHIPError_Internal.h" #import "CHIPLogging.h" -#import -#import @interface CHIPDevice () @property (nonatomic, readonly, strong, nonnull) NSRecursiveLock * lock; -@property (readonly) chip::Controller::Device * cppDevice; +@property (readonly) chip::DeviceProxy * cppDevice; @end @@ -38,7 +36,7 @@ - (instancetype)init return self; } -- (instancetype)initWithDevice:(chip::Controller::Device *)device +- (instancetype)initWithDevice:(chip::DeviceProxy *)device { if (self = [super init]) { _cppDevice = device; @@ -46,105 +44,9 @@ - (instancetype)initWithDevice:(chip::Controller::Device *)device return self; } -- (chip::Controller::Device *)internalDevice +- (chip::DeviceProxy *)internalDevice { return _cppDevice; } -- (BOOL)openPairingWindow:(NSUInteger)duration error:(NSError * __autoreleasing *)error -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - chip::SetupPayload setupPayload; - - if (duration > UINT16_MAX) { - CHIP_LOG_ERROR("Error: Duration %tu is too large. Max value %d", duration, UINT16_MAX); - if (error) { - *error = [CHIPError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; - } - return NO; - } - - [self.lock lock]; - err = self.cppDevice->OpenPairingWindow( - (uint16_t) duration, chip::Controller::Device::CommissioningWindowOption::kOriginalSetupCode, setupPayload); - [self.lock unlock]; - - if (err != CHIP_NO_ERROR) { - CHIP_LOG_ERROR("Error(%s): Open Pairing Window failed", chip::ErrorStr(err)); - if (error) { - *error = [CHIPError errorForCHIPErrorCode:err]; - } - return NO; - } - - return YES; -} - -- (NSString *)openPairingWindowWithPIN:(NSUInteger)duration - discriminator:(NSUInteger)discriminator - setupPIN:(NSUInteger)setupPIN - error:(NSError * __autoreleasing *)error -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - chip::SetupPayload setupPayload; - - if (duration > UINT16_MAX) { - CHIP_LOG_ERROR("Error: Duration %tu is too large. Max value %d", duration, UINT16_MAX); - if (error) { - *error = [CHIPError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; - } - return nil; - } - - if (discriminator > 0xfff) { - CHIP_LOG_ERROR("Error: Discriminator %tu is too large. Max value %d", discriminator, 0xfff); - if (error) { - *error = [CHIPError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; - } - return nil; - } else { - setupPayload.discriminator = (uint16_t) discriminator; - } - - setupPIN &= ((1 << chip::kSetupPINCodeFieldLengthInBits) - 1); - setupPayload.setUpPINCode = (uint32_t) setupPIN; - - [self.lock lock]; - err = self.cppDevice->OpenPairingWindow( - (uint16_t) duration, chip::Controller::Device::CommissioningWindowOption::kTokenWithProvidedPIN, setupPayload); - [self.lock unlock]; - - if (err != CHIP_NO_ERROR) { - CHIP_LOG_ERROR("Error(%s): Open Pairing Window failed", chip::ErrorStr(err)); - if (error) { - *error = [CHIPError errorForCHIPErrorCode:err]; - } - return nil; - } - - chip::ManualSetupPayloadGenerator generator(setupPayload); - std::string outCode; - - if (generator.payloadDecimalStringRepresentation(outCode) == CHIP_NO_ERROR) { - CHIP_LOG_ERROR("Setup code is %s", outCode.c_str()); - } else { - CHIP_LOG_ERROR("Failed to get decimal setup code"); - return nil; - } - - return [NSString stringWithCString:outCode.c_str() encoding:[NSString defaultCStringEncoding]]; -} - -- (BOOL)isActive -{ - bool isActive = false; - - [self.lock lock]; - isActive = self.cppDevice->IsActive(); - [self.lock unlock]; - - return isActive ? YES : NO; -} @end diff --git a/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h b/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h index bfbb96b4dad5ea..240dab2523629c 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h +++ b/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h @@ -45,10 +45,10 @@ class CHIPDeviceConnectionBridge : public chip::ReferenceCounted mOnConnected; - chip::Callback::Callback mOnConnectFailed; + chip::Callback::Callback mOnConnected; + chip::Callback::Callback mOnConnectFailed; - static void OnConnected(void * context, chip::Controller::Device * device); + static void OnConnected(void * context, chip::DeviceProxy * device); static void OnConnectionFailure(void * context, chip::NodeId deviceId, CHIP_ERROR error); }; diff --git a/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.mm b/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.mm index ac1adc8fe97311..24e49d325908dc 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.mm @@ -19,7 +19,7 @@ #import "CHIPDevice_Internal.h" #import "CHIPError_Internal.h" -void CHIPDeviceConnectionBridge::OnConnected(void * context, chip::Controller::Device * device) +void CHIPDeviceConnectionBridge::OnConnected(void * context, chip::DeviceProxy * device) { auto * object = static_cast(context); CHIPDevice * chipDevice = [[CHIPDevice alloc] initWithDevice:device]; diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.h b/src/darwin/Framework/CHIP/CHIPDeviceController.h index e9848dada27d5c..88fe674663030a 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.h +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.h @@ -60,6 +60,13 @@ typedef void (^CHIPDeviceConnectionCallback)(CHIPDevice * _Nullable device, NSEr queue:(dispatch_queue_t)queue completionHandler:(CHIPDeviceConnectionCallback)completionHandler; +- (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error:(NSError * __autoreleasing *)error; +- (nullable NSString *)openPairingWindowWithPIN:(uint64_t)deviceID + duration:(NSUInteger)duration + discriminator:(NSUInteger)discriminator + setupPIN:(NSUInteger)setupPIN + error:(NSError * __autoreleasing *)error; + - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.mm b/src/darwin/Framework/CHIP/CHIPDeviceController.mm index 873d3511b264ac..213b605c951a43 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.mm @@ -25,6 +25,8 @@ #import "CHIPP256KeypairBridge.h" #import "CHIPPersistentStorageDelegateBridge.h" #import "CHIPSetupPayload.h" +#import +#import #import #import "CHIPDeviceConnectionBridge.h" @@ -432,6 +434,87 @@ - (BOOL)getConnectedDevice:(uint64_t)deviceID return YES; } +- (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error:(NSError * __autoreleasing *)error +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (duration > UINT16_MAX) { + CHIP_LOG_ERROR("Error: Duration %tu is too large. Max value %d", duration, UINT16_MAX); + if (error) { + *error = [CHIPError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; + } + return NO; + } + + chip::SetupPayload setupPayload; + err = self.cppCommissioner->OpenCommissioningWindow(deviceID, (uint16_t) duration, 0, 0, 0, setupPayload); + + if (err != CHIP_NO_ERROR) { + CHIP_LOG_ERROR("Error(%s): Open Pairing Window failed", chip::ErrorStr(err)); + if (error) { + *error = [CHIPError errorForCHIPErrorCode:err]; + } + return NO; + } + + return YES; +} + +- (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID + duration:(NSUInteger)duration + discriminator:(NSUInteger)discriminator + setupPIN:(NSUInteger)setupPIN + error:(NSError * __autoreleasing *)error +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + chip::SetupPayload setupPayload; + + if (duration > UINT16_MAX) { + CHIP_LOG_ERROR("Error: Duration %tu is too large. Max value %d", duration, UINT16_MAX); + if (error) { + *error = [CHIPError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; + } + return nil; + } + + if (discriminator > 0xfff) { + CHIP_LOG_ERROR("Error: Discriminator %tu is too large. Max value %d", discriminator, 0xfff); + if (error) { + *error = [CHIPError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE]; + } + return nil; + } else { + setupPayload.discriminator = (uint16_t) discriminator; + } + + setupPIN &= ((1 << chip::kSetupPINCodeFieldLengthInBits) - 1); + setupPayload.setUpPINCode = (uint32_t) setupPIN; + + err = self.cppCommissioner->OpenCommissioningWindow( + deviceID, (uint16_t) duration, 1000, (uint16_t) discriminator, 2, setupPayload); + + if (err != CHIP_NO_ERROR) { + CHIP_LOG_ERROR("Error(%s): Open Pairing Window failed", chip::ErrorStr(err)); + if (error) { + *error = [CHIPError errorForCHIPErrorCode:err]; + } + return nil; + } + + chip::ManualSetupPayloadGenerator generator(setupPayload); + std::string outCode; + + if (generator.payloadDecimalStringRepresentation(outCode) == CHIP_NO_ERROR) { + CHIP_LOG_ERROR("Setup code is %s", outCode.c_str()); + } else { + CHIP_LOG_ERROR("Failed to get decimal setup code"); + return nil; + } + + return [NSString stringWithCString:outCode.c_str() encoding:[NSString defaultCStringEncoding]]; +} + - (void)setListenPort:(uint16_t)port { _listenPort = port; diff --git a/src/darwin/Framework/CHIP/CHIPDevice_Internal.h b/src/darwin/Framework/CHIP/CHIPDevice_Internal.h index 713dffa2b570a2..e00dd5ead2f4cc 100644 --- a/src/darwin/Framework/CHIP/CHIPDevice_Internal.h +++ b/src/darwin/Framework/CHIP/CHIPDevice_Internal.h @@ -21,14 +21,14 @@ #import "CHIPDevice.h" #import -#include +#include NS_ASSUME_NONNULL_BEGIN @interface CHIPDevice () -- (instancetype)initWithDevice:(chip::Controller::Device *)device; -- (chip::Controller::Device *)internalDevice; +- (instancetype)initWithDevice:(chip::DeviceProxy *)device; +- (chip::DeviceProxy *)internalDevice; @end diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp index 65019b8a70d4ea..d00d188fe702a0 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp @@ -1018,7 +1018,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); }; diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClustersWrite.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClustersWrite.cpp index 611de322d6bf2d..a9158772119f81 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClustersWrite.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClustersWrite.cpp @@ -446,7 +446,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTestWrite.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTestWrite.cpp index 3d81f2f936b3ad..2882b94c1e4b58 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTestWrite.cpp +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTestWrite.cpp @@ -1709,7 +1709,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp index 7b72162bfb792d..582acfe9f12b0a 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp @@ -36,7 +36,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); }; diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClustersWrite.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClustersWrite.cpp index 547118cf182642..fee2f00d3c0949 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClustersWrite.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClustersWrite.cpp @@ -49,7 +49,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp index 5ef6695b4a310e..3c48b3d64f383b 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp @@ -55,7 +55,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); }; diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersWrite.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersWrite.cpp index c97fad2ed0dace..871174345e8627 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersWrite.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersWrite.cpp @@ -37,7 +37,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp index 7b72162bfb792d..582acfe9f12b0a 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp @@ -36,7 +36,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); }; diff --git a/zzz_generated/pump-app/zap-generated/CHIPClustersWrite.cpp b/zzz_generated/pump-app/zap-generated/CHIPClustersWrite.cpp index 2d99becde8961a..1f13f6e29f48b6 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClustersWrite.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClustersWrite.cpp @@ -41,7 +41,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp index 2cac57f240fcf2..43b67771204d54 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp @@ -91,7 +91,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); }; diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClustersWrite.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClustersWrite.cpp index 14352ee5b8cbe0..6fdaa146d149e4 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClustersWrite.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClustersWrite.cpp @@ -52,7 +52,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp index 0cf4406f57cb50..10cfbc0c726183 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp +++ b/zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp @@ -47,7 +47,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); }; diff --git a/zzz_generated/thermostat/zap-generated/CHIPClustersWrite.cpp b/zzz_generated/thermostat/zap-generated/CHIPClustersWrite.cpp index fd53e2d427638a..c80771474d302a 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClustersWrite.cpp +++ b/zzz_generated/thermostat/zap-generated/CHIPClustersWrite.cpp @@ -41,7 +41,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr) diff --git a/zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp index 5d37300058cb47..d792245340f9c7 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp @@ -130,7 +130,6 @@ CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * c CommandResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const ResponseDataT & responseData) { successCb(context, responseData); }; diff --git a/zzz_generated/tv-app/zap-generated/CHIPClustersWrite.cpp b/zzz_generated/tv-app/zap-generated/CHIPClustersWrite.cpp index 3fab7369ccfc79..6c9e93882da143 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClustersWrite.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClustersWrite.cpp @@ -45,7 +45,6 @@ CHIP_ERROR ClusterBase::WriteAttribute(const typename AttributeInfo::Type & requ WriteResponseSuccessCallback successCb, WriteResponseFailureCallback failureCb) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mDevice->LoadSecureSessionParametersIfNeeded()); auto onSuccessCb = [context, successCb](const app::ConcreteAttributePath & commandPath) { if (successCb != nullptr)